- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page