fwi: use common.nix in reuse experiment
This commit is contained in:
parent
788dd13ebd
commit
02a103565c
@ -24,6 +24,7 @@
|
|||||||
, bsc
|
, bsc
|
||||||
, targetMachine
|
, targetMachine
|
||||||
, stages
|
, stages
|
||||||
|
, callPackage
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
@ -46,29 +47,17 @@ let
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# The c value contains something like:
|
|
||||||
# {
|
|
||||||
# n = { nx=500; ny=500; nz=500; }
|
|
||||||
# blocksize = 1;
|
|
||||||
# gitBranch = "garlic/tampi+send+oss+task";
|
|
||||||
# }
|
|
||||||
|
|
||||||
machineConfig = targetMachine.config;
|
machineConfig = targetMachine.config;
|
||||||
|
|
||||||
# Generate the complete configuration for each unit
|
# Generate the complete configuration for each unit
|
||||||
genConf = with bsc; c: targetMachine.config // rec {
|
genConf = c: targetMachine.config // rec {
|
||||||
expName = "fwi";
|
expName = "fwi-reuse";
|
||||||
unitName = "${expName}-test";
|
unitName = "${expName}"
|
||||||
|
+ "-bs${toString blocksize}"
|
||||||
|
+ "-${toString gitBranch}";
|
||||||
|
|
||||||
inherit (machineConfig) hw;
|
inherit (machineConfig) hw;
|
||||||
|
|
||||||
cc = icc;
|
|
||||||
inherit (c) gitBranch blocksize;
|
inherit (c) gitBranch blocksize;
|
||||||
|
|
||||||
#nx = c.n.nx;
|
|
||||||
#ny = c.n.ny;
|
|
||||||
#nz = c.n.nz;
|
|
||||||
|
|
||||||
# Same but shorter:
|
|
||||||
inherit (c.n) nx ny nz;
|
inherit (c.n) nx ny nz;
|
||||||
|
|
||||||
fwiInput = bsc.apps.fwi.input.override {
|
fwiInput = bsc.apps.fwi.input.override {
|
||||||
@ -77,7 +66,6 @@ let
|
|||||||
|
|
||||||
# Repeat the execution of each unit several times
|
# Repeat the execution of each unit several times
|
||||||
loops = 10;
|
loops = 10;
|
||||||
#loops = 1;
|
|
||||||
|
|
||||||
# Resources
|
# Resources
|
||||||
cpusPerTask = hw.cpusPerSocket;
|
cpusPerTask = hw.cpusPerSocket;
|
||||||
@ -87,49 +75,22 @@ let
|
|||||||
time = "02:00:00";
|
time = "02:00:00";
|
||||||
jobName = unitName;
|
jobName = unitName;
|
||||||
|
|
||||||
|
enableCTF = false;
|
||||||
|
ioFreq = -1;
|
||||||
|
|
||||||
# Enable permissions to write in the local storage
|
# Enable permissions to write in the local storage
|
||||||
extraMounts = [ fs.local.temp ];
|
extraMounts = [ fs.local.temp ];
|
||||||
|
tempDir = fs.local.temp;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Compute the array of configurations
|
common = callPackage ./common.nix {};
|
||||||
configs = stdexp.buildConfigs {
|
|
||||||
|
inherit (common) getConfigs pipeline;
|
||||||
|
|
||||||
|
configs = getConfigs {
|
||||||
inherit varConf genConf;
|
inherit varConf genConf;
|
||||||
};
|
};
|
||||||
|
|
||||||
exec = {nextStage, conf, ...}: stages.exec {
|
|
||||||
inherit nextStage;
|
|
||||||
pre = ''
|
|
||||||
#CDIR=$PWD
|
|
||||||
#export NANOS6_CONFIG_OVERRIDE="version.instrument=ctf"
|
|
||||||
EXECDIR="${fs.local.temp}/out/$GARLIC_USER/$GARLIC_UNIT/$GARLIC_RUN"
|
|
||||||
mkdir -p $EXECDIR
|
|
||||||
cd $EXECDIR
|
|
||||||
ln -fs ${conf.fwiInput}/InputModels InputModels || true
|
|
||||||
'';
|
|
||||||
argv = [
|
|
||||||
"${conf.fwiInput}/fwi_params.txt"
|
|
||||||
"${conf.fwiInput}/fwi_frequencies.txt"
|
|
||||||
conf.blocksize
|
|
||||||
"-1" # Fordward steps
|
|
||||||
"-1" # Backward steps
|
|
||||||
"-1" # Write/read frequency
|
|
||||||
];
|
|
||||||
post = ''
|
|
||||||
rm -rf Results || true
|
|
||||||
#mv trace_* $CDIR
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
apps = bsc.garlic.apps;
|
|
||||||
|
|
||||||
# FWI program
|
|
||||||
program = {nextStage, conf, ...}: apps.fwi.solver.override {
|
|
||||||
inherit (conf) cc gitBranch fwiInput;
|
|
||||||
};
|
|
||||||
|
|
||||||
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
stdexp.genExperiment { inherit configs pipeline; }
|
stdexp.genExperiment { inherit configs pipeline; }
|
@ -100,9 +100,8 @@
|
|||||||
fwi = {
|
fwi = {
|
||||||
granularity = callPackage ./fwi/granularity.nix { };
|
granularity = callPackage ./fwi/granularity.nix { };
|
||||||
ss = callPackage ./fwi/ss.nix { };
|
ss = callPackage ./fwi/ss.nix { };
|
||||||
|
reuse = callPackage ./fwi/reuse.nix { };
|
||||||
|
|
||||||
strong_scaling_mpionly = callPackage ./fwi/strong_scaling_mpionly.nix { };
|
|
||||||
data_reuse = callPackage ./fwi/data_reuse.nix { };
|
|
||||||
strong_scaling_io = callPackage ./fwi/strong_scaling_io.nix { };
|
strong_scaling_io = callPackage ./fwi/strong_scaling_io.nix { };
|
||||||
sync_io = callPackage ./fwi/sync_io.nix { };
|
sync_io = callPackage ./fwi/sync_io.nix { };
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user