Scratch file location

Scratch file location

I am running a parallel MPI program running on
a Beowulf cluster system which writes some large files opened using STATUS=SCRATCH.

I wish to arrange that these are stored in a filesystem local to the node, such as /tmp, rather than an NFS-mounted file system for reasons of efficiency.

Where do STATUS=SCRATCH files get written by default? I could not find this information in any of the documentation. Second, is it possible to specify a location at compile- or run-time?

Keith Refson

publicaciones de 2 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

The following is taken from section 8.2 of the Intel Fortran Programmer's Reference:

A scratch file is a special type of external file. It is an unnamed, temporary file that exists only while it is open?that is, it exists no longer than the life of the program. Intel Fortran uses the tempnam(3S) system routine to name the scratch file. The name becomes unavailable through the file system immediately after it is created, and it cannot be seen by the ls(1) command and cannot be opened by any other process. To create a scratch file, you must include the STATUS=?SCRATCH?
specifier in the OPEN statement, as in the following:
OPEN (25, STATUS=?SCRATCH?)
In all other respects, a scratch file behaves like other external files."

The man pages for tempnam say that the scratch file is created in directory $TMPDIR, if this environment variable is defined. So if this is set to a local directory such as /tmp in the profile, (or even in a runtime call to SETENVQQ from the portability library), you should be OK.

Martyn

Inicie sesión para dejar un comentario.