ImperialCollegeLondon / pbs-drmaa

This is a copy of DRMAA v1 for PBS from https://apps.man.poznan.pl/svn/pbs-drmaa/ (revision 104, 30 Sept 2019)
GNU General Public License v3.0
3 stars 2 forks source link

Add support for using a location other than /tmp for temp storage of submission scripts #12

Open jcohen02 opened 3 years ago

jcohen02 commented 3 years ago

At present, the function pbsdrmaa_write_tmpfile in util.c (line 253) is used to write a temporary submission script to /tmp.

The /tmp location is hardcoded but there are systems (for example some HPC systems) where the temporary directory is not /tmp. It might instead be located at a fixed, non-standard location detailed in the platform documentation or identified by an environment variable such as $TMPDIR.

To support such platforms, we need a way to override this hardcoded use of /tmp for the storage of temporary scripts.

jcohen02 commented 3 years ago

The most flexible way to address this is probably to add a new option to the pbs_drmaa.conf file - an example version of this file is provided in the repository - pbs_drmaa/pbs_drmaa.conf.example

An alternative might be to use the canonical name $TMPDIR if it's set, or look at the group of other possible accepted environment variables (see details here). This looks to be the approach taken by the C++ temp_directory_path function.