2021-04-07 12:35:44 +02:00
|
|
|
# This test compares a FWI version using poor data locality (+NOREUSE) versus
|
|
|
|
# the optimized version (used for all other experiments). Follows a pseudocode
|
|
|
|
# snippet illustrating the fundamental difference between version.
|
|
|
|
#
|
|
|
|
# NOREUSE
|
|
|
|
# ----------------------
|
|
|
|
# for (y) for (x) for (z)
|
|
|
|
# computA(v[y][x][z]);
|
|
|
|
# for (y) for (x) for (z)
|
|
|
|
# computB(v[y][x][z]);
|
|
|
|
# for (y) for (x) for (z)
|
|
|
|
# computC(v[y][x][z]);
|
|
|
|
#
|
|
|
|
# Optimized version
|
|
|
|
# ----------------------
|
|
|
|
# for (y) for (x) for (z)
|
|
|
|
# computA(v[y][x][z]);
|
|
|
|
# computB(v[y][x][z]);
|
|
|
|
# computC(v[y][x][z]);
|
|
|
|
|
2021-03-24 10:24:29 +01:00
|
|
|
{
|
|
|
|
stdenv
|
2022-09-01 16:27:29 +02:00
|
|
|
, lib
|
2021-03-24 10:24:29 +01:00
|
|
|
, stdexp
|
|
|
|
, bsc
|
|
|
|
, targetMachine
|
|
|
|
, stages
|
2021-04-12 15:48:59 +02:00
|
|
|
, callPackage
|
2021-03-24 10:24:29 +01:00
|
|
|
}:
|
|
|
|
|
2022-09-01 16:27:29 +02:00
|
|
|
with lib;
|
2021-03-24 10:24:29 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
inherit (targetMachine) fs;
|
|
|
|
|
|
|
|
# Initial variable configuration
|
|
|
|
varConf = {
|
|
|
|
gitBranch = [
|
|
|
|
"garlic/mpi+send+oss+task"
|
2021-04-07 12:35:44 +02:00
|
|
|
"garlic/mpi+send+oss+task+NOREUSE"
|
2021-03-24 10:24:29 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
blocksize = [ 1 2 4 8 ];
|
|
|
|
|
2021-04-12 20:09:17 +02:00
|
|
|
n = [ {nx=300; ny=2000; nz=300;} ]; # / half node
|
2021-03-24 10:24:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
machineConfig = targetMachine.config;
|
|
|
|
|
|
|
|
# Generate the complete configuration for each unit
|
2021-04-12 15:48:59 +02:00
|
|
|
genConf = c: targetMachine.config // rec {
|
|
|
|
expName = "fwi-reuse";
|
|
|
|
unitName = "${expName}"
|
|
|
|
+ "-bs${toString blocksize}"
|
|
|
|
+ "-${toString gitBranch}";
|
2021-03-24 10:24:29 +01:00
|
|
|
|
2021-04-12 15:48:59 +02:00
|
|
|
inherit (machineConfig) hw;
|
2021-03-24 10:24:29 +01:00
|
|
|
inherit (c) gitBranch blocksize;
|
|
|
|
inherit (c.n) nx ny nz;
|
|
|
|
|
2021-04-12 20:09:17 +02:00
|
|
|
enableCTF = false;
|
|
|
|
enableIO = true;
|
|
|
|
|
2021-03-24 10:24:29 +01:00
|
|
|
# Repeat the execution of each unit several times
|
|
|
|
loops = 10;
|
|
|
|
|
|
|
|
# Resources
|
|
|
|
cpusPerTask = hw.cpusPerSocket;
|
|
|
|
ntasksPerNode = 1;
|
|
|
|
nodes = 1;
|
|
|
|
qos = "debug";
|
|
|
|
time = "02:00:00";
|
|
|
|
jobName = unitName;
|
|
|
|
|
|
|
|
# Enable permissions to write in the local storage
|
|
|
|
extraMounts = [ fs.local.temp ];
|
2021-04-12 15:48:59 +02:00
|
|
|
tempDir = fs.local.temp;
|
2021-03-24 10:24:29 +01:00
|
|
|
};
|
|
|
|
|
2021-04-12 15:48:59 +02:00
|
|
|
common = callPackage ./common.nix {};
|
2021-03-24 10:24:29 +01:00
|
|
|
|
2021-04-12 15:48:59 +02:00
|
|
|
inherit (common) getConfigs pipeline;
|
2021-03-24 10:24:29 +01:00
|
|
|
|
2021-04-12 15:48:59 +02:00
|
|
|
configs = getConfigs {
|
|
|
|
inherit varConf genConf;
|
2021-03-24 10:24:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdexp.genExperiment { inherit configs pipeline; }
|