open SCRATCH

I have a simple line (line 28):
OPEN(30, STATE=‘SCRATCH’)

This works with no problem on most of our Linux systems. However, I just moved the execution to another system and get the error:
PGFIO/stdio: No such file or directory
PGFIO-F-/OPEN/unit=30/error code returned by host stdio - 2.
In source file programname.f, at line number 28

Both systems are Linux, but a very slight version difference:
2.4.20-29.7 (the one that works)
2.4.20-28.7

Can anyone shed some light on how to address this?
Thanks.
mbrfc

I guess first thing make sure you have read and write permissions on where you expect the file to be temporarily written.

  • Brent

I guess first thing make sure you have read and write permissions on where you expect the file to be temporarily written.

  • Brent

I really don’t know where to expect the temp. file to be written. The program is on a mounted file system, so permissions should be exactly the same… unless it is trying to create a temp file in some local system folder.

How can I know where this file may be created?
(I am not a highly experienced Fortran programmer)

Hi,

Sorry for the delay.

The location of the scratch file is based on this algorithm:

If the environment variable TMPDIR is set, use that
Otherwise, if the environment variable TMP is set, use that,
Otherwise, try the path prefix P_tmpdir defined in stdio.h,
Otherwise, use /tmp.