resourcemanager - Slurm: create a directory on all nodes -
i'm launching job parallel execution slurm. job needs directory structure exist in each node, if use mkdir
in job script, directories created in first node. how can make sure directories created in nodes used job?
i guess have answer myself. not perfect solution, worked in case enough. in job script used before real job starts:
for node in $(scontrol show hostnames $slurm_nodelist) ; srun -n 1-1 -n 1 -w $node mkdir -p /directory/to/be/created done sleep 60
the node list in $slurm_nodelist
abbreviated, scontrol
statement full names. without sleep
command had problems directory not existing, added safe.
the problem need know directories need created in advance, possible in case, might more difficult in other circumstances.
Comments
Post a Comment