It is intended for storing files only during the time when the program is reading and writing them. Each batch job reserves its own temporary directory, and the directory and its contents are purged when the run is completed. The temporary directories of interactive sessions are retained for 24 hours after the last (read/write) action. Backup copies are not taken of the contents of a temporary directory.
The runtime directory is always on the local, fastest disks of the machine.
Below is an example of a program called test.
cd $TMPDIR
ln -s $HOME/data/test.dat fort.8
test
cp fort.11 $WRKDIR/test.11
In this example, the execution proceeds as follows:
-
Go to a temporary directory
-
The program test reads file test.dat located on device 8 on the home directory subdirectory data>/tt>. The file is linked to Fortran’s device 8 (>tt>fort.8).
-
Run program test.
-
The program writes the output to device 11. To finish, the result file fort.11 is copied to the work directory and named test.11.