Re: [fluka-discuss]: problems of two-steps method

From: Andrea Fontana <>
Date: Fri, 2 Nov 2018 12:16:20 +0100

Dear Yang,
     I ran your example and I have found a couple of FORTRAN errors
in the file I/O instructions:

- in file 1.f in the OPEN instruction, you have put 'NEW' as status,
   but this will create a new file for each WRITE statement (the
   function is called at *each* boundary crossing): simply write
   'UNKNOWN' or do not specify the status.
   With this correction, at step 1 you write the Data1.dat file
   (named 1001_Data1.dat with Fluka naming conventions).

- in file source.f, the problem is due to the fact that UNIT=88
   should be opened in the 2.inp file with the Fluka card OPEN
   and not directly in the FORTRAN code.
   Moreover, you read 20000 lines, but your file has only 10000:
   therefore you hit the end of file and this generates the EOF error.
   To be on the safe side, I have put a protection in the READ
   statement as:

         READ (88,102,END=101)

   so that the code knows how to handle this situation.
   At this point, step 2 also works, but the I have seen tracking
   errors, seemingly due to geometry problems...

I leave it to you now, but I am available for further interactions
if needed.

In attachment, a revised version of your files.

Kind regards,

Il 02/11/2018 08:16, YANG Tao ha scritto:
> Hi, everyone!
> Recently, I simulate  using so called two-steps method to simulate the
> activation problem. File 1.input and 1.f use FLUSCW.F +USRBDX to
> calculate the generated particles, and 2.f use the 1st step results as
> the source. But when I run the 2nd step, I get an error(seen in
> 2.log), "At line 73 of file source.f (unit = 88, file = '../try.dat')
> Fortran runtime error: End of file", I try many ways but cannot solve
> it. could anyone give a suggestion, any suggestion is appreciate!
> Best regards!
> Yang

Dr. Andrea Fontana                    tel: +39 0382 987991
Istituto Nazionale                    fax: +39 0382 423241
di Fisica Nucleare
Sezione di Pavia                      e-mail:
Via Bassi 6                           web   :
27100 PAVIA, Italy

You can manage unsubscription from this mailing list at

Received on Fri Nov 02 2018 - 13:58:52 CET

This archive was generated by hypermail 2.3.0 : Fri Nov 02 2018 - 13:58:53 CET