pyfsi/coconut

Use $TMPDIR instead of hard coding /tmp

Closed this issue · 1 comments

On some clusters (such as the KU Leuven VSC cluster) the /tmp directory is not intended for large files. Instead, the directory stored in $TMPDIR (which points to dedicated space on a local disk and is set when a job starts) should be used. Most Unix programs follow this convention (https://en.wikipedia.org/wiki/TMPDIR), but here /tmp is hard coded in some places, for example

sprintf(file_name, "/tmp/nodes_update_timestep%i_thread%i.dat",
)
Would you consider changing this behavior and use ${TMPDIR} for storing such files if the variable is set?

Thanks for pointing out this flaw in our code, the issue has been addressed in pull request #161. The code now uses $TMPDIR unless it is unset, then still /tmp is used.