2020-10-30 15:58:03 +01:00
|
|
|
{
|
|
|
|
stdenv
|
|
|
|
, stdexp
|
|
|
|
, bsc
|
|
|
|
, targetMachine
|
|
|
|
, stages
|
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
# Initial variable configuration
|
|
|
|
varConf = {
|
2021-01-29 15:33:12 +01:00
|
|
|
gitBranch = [
|
|
|
|
"garlic/tampi+send+oss+task"
|
|
|
|
"garlic/mpi+send+omp+task"
|
|
|
|
"garlic/mpi+send+oss+task"
|
|
|
|
"garlic/mpi+send+seq"
|
|
|
|
"garlic/oss+task"
|
|
|
|
"garlic/omp+task"
|
|
|
|
"garlic/seq"
|
|
|
|
];
|
2020-10-30 15:58:03 +01:00
|
|
|
};
|
|
|
|
|
2021-01-29 15:33:12 +01:00
|
|
|
machineConfig = targetMachine.config;
|
|
|
|
|
2020-10-30 15:58:03 +01:00
|
|
|
# Generate the complete configuration for each unit
|
|
|
|
genConf = with bsc; c: targetMachine.config // rec {
|
2021-01-29 15:33:12 +01:00
|
|
|
expName = "fwi";
|
|
|
|
unitName = "${expName}-test";
|
|
|
|
inherit (machineConfig) hw;
|
|
|
|
|
2020-10-30 15:58:03 +01:00
|
|
|
cc = icc;
|
2021-01-29 15:33:12 +01:00
|
|
|
gitBranch = c.gitBranch;
|
2020-10-30 15:58:03 +01:00
|
|
|
|
2021-01-29 15:33:12 +01:00
|
|
|
# Repeat the execution of each unit several times
|
|
|
|
loops = 10;
|
2020-10-30 15:58:03 +01:00
|
|
|
|
|
|
|
# Resources
|
2021-01-29 15:33:12 +01:00
|
|
|
cpusPerTask = hw.cpusPerSocket;
|
|
|
|
ntasksPerNode = 1;
|
2020-10-30 15:58:03 +01:00
|
|
|
nodes = 1;
|
2021-01-29 15:33:12 +01:00
|
|
|
qos = "debug";
|
2020-10-30 15:58:03 +01:00
|
|
|
time = "02:00:00";
|
2021-01-29 15:33:12 +01:00
|
|
|
jobName = unitName;
|
2020-10-30 15:58:03 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# Compute the array of configurations
|
|
|
|
configs = stdexp.buildConfigs {
|
|
|
|
inherit varConf genConf;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Custom stage to copy the FWI input
|
2021-01-29 15:33:12 +01:00
|
|
|
#copyInput = {nextStage, conf, ...}:
|
|
|
|
# let
|
|
|
|
# input = bsc.garlic.apps.fwi;
|
|
|
|
# in
|
|
|
|
# stages.exec {
|
|
|
|
# inherit nextStage;
|
|
|
|
# env = ''
|
|
|
|
# cp -r ${input}/bin/InputModels .
|
|
|
|
# chmod +w -R .
|
|
|
|
# '';
|
|
|
|
# argv = [
|
|
|
|
# "${input}/etc/fwi/fwi_params.txt"
|
|
|
|
# "${input}/etc/fwi/fwi_frequencies.txt"
|
|
|
|
# ];
|
|
|
|
# };
|
|
|
|
|
|
|
|
apps = bsc.garlic.apps;
|
2020-10-30 15:58:03 +01:00
|
|
|
|
|
|
|
# FWI program
|
2021-01-29 15:33:12 +01:00
|
|
|
program = {nextStage, conf, ...}: apps.fwi.solver.override {
|
|
|
|
inherit (conf) cc gitBranch;
|
|
|
|
};
|
2020-10-30 15:58:03 +01:00
|
|
|
|
2021-01-29 15:33:12 +01:00
|
|
|
pipeline = stdexp.stdPipeline ++ [ program ];
|
2020-10-30 15:58:03 +01:00
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdexp.genExperiment { inherit configs pipeline; }
|