creams: run the cp command in one process only

This commit is contained in:
Pedro Martinez 2021-03-01 09:39:57 +01:00
parent 1aa0e77157
commit 8445fb0928
4 changed files with 109 additions and 105 deletions

View File

@ -38,24 +38,24 @@ let
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "creams-gran-node1";
unitName = "${expName}-${toString nodes}-${gitBranch}";
inherit (targetMachine.config) hw;
# Options for creams
cc = icc;
mpi = impi;
inherit (c.input) granul;
inherit (c.input) granul time nodes;
inherit (c) gitBranch;
nprocz = ntasksPerNode * nodes;
unitName = "${expName}-${toString nodes}-${gitBranch}";
# Repeat the execution of each unit 30 times
loops = 30;
# Repeat the execution of each unit 10 times
loops = 10;
# Resources
qos = "debug";
ntasksPerNode = hw.socketsPerNode;
cpusPerTask = hw.cpusPerSocket;
inherit (c.input) time nodes;
jobName = unitName;
nprocz = ntasksPerNode * nodes;
};
# Compute the array of configurations
@ -63,29 +63,24 @@ let
inherit varConf genConf;
};
# Use nanos6 with regions
nanos6Env = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions"
'';
};
# Custom stage to copy the creams input dataset
copyInput = {nextStage, conf, ...}:
# Custom srun stage to copy the creams input dataset
customSrun = {nextStage, conf, ...}:
let
input = bsc.garlic.apps.creamsInput.override {
inherit (conf) gitBranch granul nprocz;
};
in
stages.exec {
stages.srun {
# These are part of the stdndard srun stage:
inherit (conf) nixPrefix;
inherit nextStage;
env = ''
# Only the MPI rank 0 will copy the files
if [ $SLURM_PROCID == 0 ]; then
cp -fr ${input}/SodTubeBenchmark/* .
chmod +w -R .
fi
cpuBind = "cores,verbose";
# Now we add some commands to execute before calling srun. These will
# only run in one rank (the first in the list of allocated nodes)
preSrun = ''
cp -r ${input}/SodTubeBenchmark/* .
chmod +w -R .
'';
};
@ -98,7 +93,12 @@ let
inherit cc mpi gitBranch;
};
pipeline = stdexp.stdPipeline ++ [ nanos6Env copyInput creams ];
pipeline = stdexp.stdPipelineOverride {
overrides = {
# Replace the stdandard srun stage with our own
srun = customSrun;
};
} ++ [ creams ];
in

View File

@ -36,24 +36,24 @@ let
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "creams-gran-node16";
unitName = "${expName}-${toString nodes}-${gitBranch}";
inherit (targetMachine.config) hw;
# Options for creams
cc = icc;
mpi = impi;
inherit (c.input) granul;
inherit (c.input) granul time nodes;
inherit (c) gitBranch;
nprocz = ntasksPerNode * nodes;
unitName = "${expName}-${toString nodes}-${gitBranch}";
# Repeat the execution of each unit 30 times
loops = 30;
# Repeat the execution of each unit 10 times
loops = 10;
# Resources
qos = "debug";
ntasksPerNode = hw.socketsPerNode;
cpusPerTask = hw.cpusPerSocket;
inherit (c.input) time nodes;
jobName = unitName;
nprocz = ntasksPerNode * nodes;
};
# Compute the array of configurations
@ -61,29 +61,24 @@ let
inherit varConf genConf;
};
# Use nanos6 with regions
nanos6Env = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions"
'';
};
# Custom stage to copy the creams input dataset
copyInput = {nextStage, conf, ...}:
# Custom srun stage to copy the creams input dataset
customSrun = {nextStage, conf, ...}:
let
input = bsc.garlic.apps.creamsInput.override {
inherit (conf) gitBranch granul nprocz;
};
in
stages.exec {
stages.srun {
# These are part of the stdndard srun stage:
inherit (conf) nixPrefix;
inherit nextStage;
env = ''
# Only the MPI rank 0 will copy the files
if [ $SLURM_PROCID == 0 ]; then
cp -fr ${input}/SodTubeBenchmark/* .
chmod +w -R .
fi
cpuBind = "cores,verbose";
# Now we add some commands to execute before calling srun. These will
# only run in one rank (the first in the list of allocated nodes)
preSrun = ''
cp -r ${input}/SodTubeBenchmark/* .
chmod +w -R .
'';
};
@ -96,7 +91,12 @@ let
inherit cc mpi gitBranch;
};
pipeline = stdexp.stdPipeline ++ [ nanos6Env copyInput creams ];
pipeline = stdexp.stdPipelineOverride {
overrides = {
# Replace the stdandard srun stage with our own
srun = customSrun;
};
} ++ [ creams ];
in

View File

@ -31,25 +31,25 @@ let
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "creams-ss";
unitName = "${expName}-${toString nodes}-${gitBranch}";
expName = "creams-ss-hybrid";
inherit (targetMachine.config) hw;
# Options for creams
cc = icc;
mpi = impi;
inherit (c.input) granul;
inherit (c.input) granul time nodes;
inherit (c) gitBranch;
nprocz = ntasksPerNode * nodes;
unitName = "${expName}-${toString nodes}-${gitBranch}";
# Repeat the execution of each unit 30 times
loops = 30;
# Repeat the execution of each unit 10 times
loops = 10;
# Resources
qos = "debug";
ntasksPerNode = hw.socketsPerNode;
cpusPerTask = hw.cpusPerSocket;
inherit (c.input) time nodes;
jobName = unitName;
nprocz = ntasksPerNode * nodes;
};
# Compute the array of configurations
@ -57,29 +57,24 @@ let
inherit varConf genConf;
};
# Use nanos6 with regions
nanos6Env = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions"
'';
};
# Custom stage to copy the creams input dataset
copyInput = {nextStage, conf, ...}:
# Custom srun stage to copy the creams input dataset
customSrun = {nextStage, conf, ...}:
let
input = bsc.garlic.apps.creamsInput.override {
inherit (conf) gitBranch granul nprocz;
};
in
stages.exec {
stages.srun {
# These are part of the stdndard srun stage:
inherit (conf) nixPrefix;
inherit nextStage;
env = ''
# Only the MPI rank 0 will copy the files
if [ $SLURM_PROCID == 0 ]; then
cp -fr ${input}/SodTubeBenchmark/* .
chmod +w -R .
fi
cpuBind = "cores,verbose";
# Now we add some commands to execute before calling srun. These will
# only run in one rank (the first in the list of allocated nodes)
preSrun = ''
cp -r ${input}/SodTubeBenchmark/* .
chmod +w -R .
'';
};
@ -92,7 +87,12 @@ let
inherit cc mpi gitBranch;
};
pipeline = stdexp.stdPipeline ++ [ nanos6Env copyInput creams ];
pipeline = stdexp.stdPipelineOverride {
overrides = {
# Replace the stdandard srun stage with our own
srun = customSrun;
};
} ++ [ creams ];
in

View File

@ -12,35 +12,39 @@ let
# Initial variable configuration
varConf = {
input = [
{ time="02:00:00"; nodes=1; }
{ time="02:00:00"; nodes=2; }
{ time="02:00:00"; nodes=4; }
{ time="02:00:00"; nodes=8; }
{ time="02:00:00"; nodes=16; }
{ nodes=1 ; nprocz=2 ; granul=999999; time= "02:00:00"; }
{ nodes=2 ; nprocz=4 ; granul=999999; time= "02:00:00"; }
{ nodes=4 ; nprocz=8 ; granul=999999; time= "02:00:00"; }
{ nodes=8 ; nprocz=16; granul=999999; time= "02:00:00"; }
{ nodes=16; nprocz=32; granul=999999; time= "02:00:00"; }
];
gitBranch = [
"garlic/mpi+send+seq"
];
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "creams-ss";
unitName = "${expName}-${toString nodes}-${gitBranch}";
expName = "creams-ss-pure";
inherit (targetMachine.config) hw;
# Options for creams
cc = icc;
mpi = impi;
granul = 0;
gitBranch = "garlic/mpi+send+seq";
nprocz = ntasksPerNode * nodes;
inherit (c.input) granul time nodes;
inherit (c) gitBranch;
unitName = "${expName}-${toString nodes}-${gitBranch}";
# Repeat the execution of each unit 30 times
loops = 30;
# Repeat the execution of each unit 10 times
loops = 10;
# Resources
qos = "debug";
ntasksPerNode = hw.cpusPerNode;
cpusPerTask = 1;
inherit (c.input) time nodes;
jobName = unitName;
nprocz = ntasksPerNode * nodes;
};
# Compute the array of configurations
@ -48,29 +52,24 @@ let
inherit varConf genConf;
};
# Use nanos6 with regions
nanos6Env = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions"
'';
};
# Custom stage to copy the creams input dataset
copyInput = {nextStage, conf, ...}:
# Custom srun stage to copy the creams input dataset
customSrun = {nextStage, conf, ...}:
let
input = bsc.garlic.apps.creamsInput.override {
inherit (conf) gitBranch granul nprocz;
};
in
stages.exec {
stages.srun {
# These are part of the stdndard srun stage:
inherit (conf) nixPrefix;
inherit nextStage;
env = ''
# Only the MPI rank 0 will copy the files
if [ $SLURM_PROCID == 0 ]; then
cp -fr ${input}/SodTubeBenchmark/* .
chmod +w -R .
fi
cpuBind = "cores,verbose";
# Now we add some commands to execute before calling srun. These will
# only run in one rank (the first in the list of allocated nodes)
preSrun = ''
cp -r ${input}/SodTubeBenchmark/* .
chmod +w -R .
'';
};
@ -83,7 +82,12 @@ let
inherit cc mpi gitBranch;
};
pipeline = stdexp.stdPipeline ++ [ nanos6Env copyInput creams ];
pipeline = stdexp.stdPipelineOverride {
overrides = {
# Replace the stdandard srun stage with our own
srun = customSrun;
};
} ++ [ creams ];
in