creams: avoid race condition

Ensure only one Slurm process performs environment operations
This commit is contained in:
Pedro Martinez 2021-02-26 09:10:26 +01:00
parent 938246322f
commit 1aa0e77157
4 changed files with 20 additions and 8 deletions

View File

@ -81,8 +81,11 @@ let
stages.exec { stages.exec {
inherit nextStage; inherit nextStage;
env = '' env = ''
cp -r ${input}/SodTubeBenchmark/* . # Only the MPI rank 0 will copy the files
if [ $SLURM_PROCID == 0 ]; then
cp -fr ${input}/SodTubeBenchmark/* .
chmod +w -R . chmod +w -R .
fi
''; '';
}; };

View File

@ -79,8 +79,11 @@ let
stages.exec { stages.exec {
inherit nextStage; inherit nextStage;
env = '' env = ''
cp -r ${input}/SodTubeBenchmark/* . # Only the MPI rank 0 will copy the files
if [ $SLURM_PROCID == 0 ]; then
cp -fr ${input}/SodTubeBenchmark/* .
chmod +w -R . chmod +w -R .
fi
''; '';
}; };

View File

@ -75,8 +75,11 @@ let
stages.exec { stages.exec {
inherit nextStage; inherit nextStage;
env = '' env = ''
cp -r ${input}/SodTubeBenchmark/* . # Only the MPI rank 0 will copy the files
if [ $SLURM_PROCID == 0 ]; then
cp -fr ${input}/SodTubeBenchmark/* .
chmod +w -R . chmod +w -R .
fi
''; '';
}; };

View File

@ -66,8 +66,11 @@ let
stages.exec { stages.exec {
inherit nextStage; inherit nextStage;
env = '' env = ''
cp -r ${input}/SodTubeBenchmark/* . # Only the MPI rank 0 will copy the files
if [ $SLURM_PROCID == 0 ]; then
cp -fr ${input}/SodTubeBenchmark/* .
chmod +w -R . chmod +w -R .
fi
''; '';
}; };