I'm launching a job for parallel execution with slurm. This job needs a certain directory structure to exist in each node, but if I use mkdir
in the job script, the directories are only created in the first node. How can I make sure the directories are created in all nodes used by the job?
Slurm: create a directory on all nodes
1.9k Views Asked by Jellby At
2
I guess I have to answer myself. This is not a perfect solution, but it worked in my case good enough. In the job script I used this before the real job starts:
The node list in
$SLURM_NODELIST
is abbreviated, with thescontrol
statement I get the full names. Without thesleep
command I sometimes had problems with some directory not existing, so added it just to be safe.The problem is that I need to know which directories need to be created in advance, which is possible in my case, but might be more difficult in other circumstances.