Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Placement of STATUS=SCRATCH files

keith-refson
Beginner
1,901 Views
Dear forum,

For the purposes of running on a parallel cluster system under MPI I need to explicitly
set the directory where temporary scratch file created with OPEN(STATUS=SCRATCH)
are placed.

The man page for ifort 10.1.011 states: under Run-Time Environment Variables that

TEMP, TMP, and TMPDIR
Lets you specify an alternate working directory where temporary files are created.

but this is not correct. I have tested this using an ifort-compiled program , and only the TMPDIR environment variable is honoured - the others are ignored. And running "strings" on the executable (with statically linked
intel libraries) can find only TEMPDIR and not TMP or TEMP.

Is this simply a documentation error? Or are the others really supposed to work?

Keith Refson


0 Kudos
5 Replies
Kevin_D_Intel
Employee
1,901 Views
I inquired with the Fortran run-time library developer about clarification for the intended use of all three variables relative to OPEN (STATUS=SCRATCH) and will post an update when I have more information.
0 Kudos
Kevin_D_Intel
Employee
1,901 Views

The RTL developer says the documentation is incorrect so we will make the necessary clarifications relative to STATUS=SCRATCH.

At present, on Linux, only TMPDIR is checked currently related to STATUS=SCRATCH.

We are now also considering a feature enhancement to a future release to check all three under Linux and Mac OS X in relation to this OPEN specifier.

Just an aside, TMPDIR is also only checked on Mac OS X, however, that is not currently working with STATUS=SCRATCH. For Windows, only TEMP and TMP are checked in relation to this specifier.

Hope that helps.

0 Kudos
keith-refson
Beginner
1,901 Views
Thanks for checking this. It's useful to know what to expect.

If Intel do decide to update the behaviour as you say, I'd like to
suggest that you consider also testing some specific variable,
eg IFORT_TMPDIR, similar to G95_TMPDIR or GORTRAN_TMPDIR
which implement similar functionality in those compilers.

It is common in PBS-like batch systems for the queue manager
to set and rely on TMP or TMPDIR so this can not be changed.
It would therefore be useful to have independent control, hence
an ifort-specific variable.

Keith Refson

0 Kudos
Kevin_D_Intel
Employee
1,901 Views

Great suggestion Keith. I will include this in the feature request. (Internal ref. CQ-49373)

0 Kudos
Kevin_D_Intel
Employee
1,901 Views

The next Intel Fortran minor release (11.1) tentatively scheduled for release in mid-2009 will support a new environment variable FORT_TMPDIR on all currently supported OSes.

As per the developer: "One can use FORT_TMPDIR environment variable or the TMP or TEMP (on Windows), TMPDIR (on Linux/Mac) environment variable to specify the path for scratch files; if neither environment variable is defined, the default is the current directory. The environment variables search order is as defined in previous sentence."

0 Kudos
Reply