Thanks all for your suggestions.

I ended up doing something that is pretty similar, with Prolog creating and TaskProlog exporting the working directory, and then a SPANK plugin is used to give the user options to copy files in and out of scratch.

The only thing the user still has to do is cd to the working directory so that their output files are created there as well, but this is much better than having users also manually copy the files (which would not happen if jobs failed due to exceeding a resource limit).


On 3/14/17 1:51 AM, Bjørn-Helge Mevik wrote:
We do it like this:

- Prolog creates $SCRATCH, chowns it to the user
- Task Prolog exports the $SCRATCH variable to the job step
- Users can use a command "savefile" in their job script that
   registers the file(s) so that the epilog can copy them back (the
   command simply writes the file names to a dot file in $SCRATCH)
- The Epilog copies any registered files back to the job submit dir (it
   uses "su - $USER" when doing this).
- The epilog deletes the directory


Reply via email to