OPEN

Summary

Defines input/output files to be connected at run-time. ​

​

WHAT(1) > 0.0:

logical unit number of a formatted file to be opened

< 0.0:

logical unit number of an unformatted file to be opened

Default

:  no default (WHAT(1) must not be = 0.0)

WHAT(2)

– WHAT(6): not used

SDUM

= NEW: the file is opened with status NEW

=

OLD: the file is opened with status OLD

=

UNKNOWN: the file is opened with status UNKNOWN

=

SCRATCH: the file is opened with status SCRATCH

Default

= OLD  if |WHAT(1)| = 9, 12, 13, 14, otherwise = NEW

Unless SDUM = SCRATCH, the name of the file to be opened must be given in the card which immediately follows.​

Default

(option OPEN not given): no file is opened at run time. On UNIX​ and Linux​, the rfluka script provided with the FLUKA code creates the necessary symbolic links.

Notes

  1. The input/output files​ used by FLUKA are of several kinds:

    • Standard input​ (logical unit 5) and standard output​ (logical unit 11) must be redirected via < and > (on UNIX and Linux), or pre-connected via FILEDEF, ASSIGN​, etc. on other systems.

    • cross section unformatted data files (logical unit numbers 9, 13 and 14) can be opened with the OPEN option (SDUM = OLD or READONLY)​, or can be pre-connected (on most UNIX systems, pre-connection​ is obtained by means of symbolic links​). If OPEN is used, the full file name must be given in the card which follows.

    • The same is true for the initial seeds file​ for the random number generator, if used (logical unit number defined by card RANDOMIZE). However, while WHAT(1) must be negative for unformatted data files, it must be positive for the seeds data.

    • Scratch files​ (unit 8 for EMF auxiliary output and unit 16 for Combinatorial Geometry​ working space, see) can also be OPENed (with SDUM = SCRATCH) or (not on UNIX) pre-connected. No file name card must be given for scratch files.

    • The “next seeds” file from the random number generator (logical unit number 2, see) can be opened by any of the three ways described above (i.e. by OPEN, by pre-connection or automatically) on any of the supported systems.

    • Error message file​ (logical unit number 15) and estimator output files​ (created by scoring options such as USRBIN, USRBDX, DETECT etc.):

      • On UNIX systems, they can either be opened by the user (with option OPEN, SDUM = NEW or UNKNOWN and file name given on the next card) or automatically by the program with a default name of the form fort.xxx or ftn.xxx, where xxx is the logical unit number.

    • Files created by user-written code (User routines): all three possibilities are available. Of course, a Fortran statement OPEN​ can also be used in this case.

  2. It is possible to pre-connect some of the files and to OPEN others.

Examples:

*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+...
*   opening the file with the random number seeds for the next run
OPEN              2.                                                  NEW
newseed.random
*   the working space for Combinatorial Geometry
OPEN             16.                                                  SCRATCH