nbody: refactor experiments into common.nix
This commit is contained in:
parent
f729fc4006
commit
e1433fedb8
@ -9,8 +9,8 @@
|
||||
{
|
||||
nbody = rec {
|
||||
granularity = callPackage ./nbody/granularity.nix { };
|
||||
nodesorsockets = callPackage ./nbody/nodes-or-sockets-mpi.nix { };
|
||||
scaling = callPackage ./nbody/strong-scaling-mpi.nix { };
|
||||
ss = callPackage ./nbody/ss.nix { };
|
||||
numa = callPackage ./nbody/numa.nix { };
|
||||
};
|
||||
|
||||
saiph = {
|
||||
|
36
garlic/exp/nbody/common.nix
Normal file
36
garlic/exp/nbody/common.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
stdenv
|
||||
, stdexp
|
||||
, bsc
|
||||
, stages
|
||||
, numactl
|
||||
, garlicTools
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
with garlicTools;
|
||||
|
||||
rec {
|
||||
getConfigs = {varConf, genConf}: stdexp.buildConfigs {
|
||||
inherit varConf genConf;
|
||||
};
|
||||
|
||||
exec = {nextStage, conf, ...}: stages.exec
|
||||
(
|
||||
{
|
||||
inherit nextStage;
|
||||
argv = with conf; [ "-t" timesteps "-p" particles ];
|
||||
}
|
||||
# Use numactl to use the interleave policy if requested (default is
|
||||
# false)
|
||||
// optionalAttrs (conf.interleaveMem or false) {
|
||||
program = "${numactl}/bin/numactl --interleave=all ${stageProgram nextStage}";
|
||||
}
|
||||
);
|
||||
|
||||
program = {nextStage, conf, ...}: bsc.garlic.apps.nbody.override {
|
||||
inherit (conf) blocksize gitBranch;
|
||||
};
|
||||
|
||||
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
||||
}
|
@ -5,6 +5,7 @@
|
||||
, targetMachine
|
||||
, stages
|
||||
, garlicTools
|
||||
, callPackage
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
@ -12,11 +13,11 @@ with garlicTools;
|
||||
|
||||
let
|
||||
# Initial variable configuration
|
||||
varConf = with bsc; {
|
||||
blocksize = [ 128 256 512 1024 2048 4096 ];
|
||||
varConf = {
|
||||
blocksize = range2 64 2048;
|
||||
gitBranch = [
|
||||
"garlic/mpi+send+oss+task"
|
||||
"garlic/tampi+send+oss+task"
|
||||
# "garlic/mpi+send+oss+task"
|
||||
# "garlic/tampi+send+oss+task"
|
||||
"garlic/tampi+isend+oss+task"
|
||||
];
|
||||
};
|
||||
@ -24,40 +25,35 @@ let
|
||||
# Generate the complete configuration for each unit
|
||||
genConf = c: targetMachine.config // rec {
|
||||
hw = targetMachine.config.hw;
|
||||
particles = 4096 * hw.cpusPerSocket;
|
||||
particles = 8 * 1024 * hw.cpusPerSocket;
|
||||
timesteps = 10;
|
||||
blocksize = c.blocksize;
|
||||
gitBranch = c.gitBranch;
|
||||
|
||||
expName = "nbody-granularity";
|
||||
unitName = expName + "-${toString gitBranch}" + "-bs${toString blocksize}";
|
||||
unitName = expName +
|
||||
"-${toString gitBranch}" +
|
||||
"-bs${toString blocksize}";
|
||||
|
||||
loops = 30;
|
||||
loops = 10;
|
||||
|
||||
qos = "bsc_cs";
|
||||
ntasksPerNode = 1;
|
||||
nodes = 1;
|
||||
time = "04:00:00";
|
||||
qos = "debug";
|
||||
cpusPerTask = hw.cpusPerSocket;
|
||||
ntasksPerNode = hw.socketsPerNode;
|
||||
nodes = 1;
|
||||
time = "02:00:00";
|
||||
jobName = unitName;
|
||||
};
|
||||
|
||||
# Compute the array of configurations
|
||||
configs = stdexp.buildConfigs {
|
||||
|
||||
common = callPackage ./common.nix {};
|
||||
|
||||
inherit (common) getConfigs pipeline;
|
||||
|
||||
configs = getConfigs {
|
||||
inherit varConf genConf;
|
||||
};
|
||||
|
||||
exec = {nextStage, conf, ...}: stages.exec {
|
||||
inherit nextStage;
|
||||
argv = [ "-t" conf.timesteps "-p" conf.particles ];
|
||||
};
|
||||
|
||||
program = {nextStage, conf, ...}: with conf; bsc.garlic.apps.nbody.override {
|
||||
inherit (conf) blocksize gitBranch;
|
||||
};
|
||||
|
||||
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
||||
|
||||
in
|
||||
|
||||
stdexp.genExperiment { inherit configs pipeline; }
|
||||
|
@ -1,72 +0,0 @@
|
||||
{
|
||||
stdenv
|
||||
, stdexp
|
||||
, bsc
|
||||
, targetMachine
|
||||
, stages
|
||||
, garlicTools
|
||||
, numactl
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
with garlicTools;
|
||||
|
||||
let
|
||||
# Initial variable configuration
|
||||
varConf = with bsc; {
|
||||
blocksize = [ 256 512 1024 ];
|
||||
gitBranch = [ "garlic/tampi+send+oss+task" ];
|
||||
attachToSocket = [ true false ];
|
||||
numactl = [ true false ];
|
||||
};
|
||||
|
||||
# Generate the complete configuration for each unit
|
||||
genConf = c: targetMachine.config // rec {
|
||||
hw = targetMachine.config.hw;
|
||||
particles = 4 * 4096 * hw.cpusPerSocket;
|
||||
timesteps = 10;
|
||||
blocksize = c.blocksize;
|
||||
gitBranch = c.gitBranch;
|
||||
socketAtt = c.attachToSocket;
|
||||
useNumact = c.numactl;
|
||||
|
||||
expName = "nbody-granularity";
|
||||
attachName = if (socketAtt) then "PerSocket" else "PerNode";
|
||||
numaName = if (useNumact) then "True" else "False";
|
||||
unitName = expName +
|
||||
"-${toString gitBranch}" +
|
||||
"-bs${toString blocksize}" +
|
||||
"-ranks${toString attachName}" +
|
||||
"-useNuma${toString numaName}";
|
||||
|
||||
loops = 30;
|
||||
|
||||
qos = "debug";
|
||||
ntasksPerNode = if (socketAtt) then 2 else 1;
|
||||
nodes = 4;
|
||||
time = "02:00:00";
|
||||
cpusPerTask = if (socketAtt) then hw.cpusPerSocket else 2*hw.cpusPerSocket;
|
||||
jobName = unitName;
|
||||
};
|
||||
|
||||
# Compute the array of configurations
|
||||
configs = stdexp.buildConfigs {
|
||||
inherit varConf genConf;
|
||||
};
|
||||
|
||||
exec = {nextStage, conf, ...}: stages.exec ({
|
||||
inherit nextStage;
|
||||
argv = [ "-t" conf.timesteps "-p" conf.particles ];
|
||||
} // optionalAttrs (conf.useNumact) {
|
||||
program = "${numactl}/bin/numactl --interleave=all ${stageProgram nextStage}";
|
||||
});
|
||||
|
||||
program = {nextStage, conf, ...}: with conf; bsc.garlic.apps.nbody.override {
|
||||
inherit (conf) blocksize gitBranch;
|
||||
};
|
||||
|
||||
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
||||
|
||||
in
|
||||
|
||||
stdexp.genExperiment { inherit configs pipeline; }
|
63
garlic/exp/nbody/numa.nix
Normal file
63
garlic/exp/nbody/numa.nix
Normal file
@ -0,0 +1,63 @@
|
||||
{
|
||||
stdenv
|
||||
, stdexp
|
||||
, bsc
|
||||
, targetMachine
|
||||
, stages
|
||||
, garlicTools
|
||||
, numactl
|
||||
, callPackage
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
with garlicTools;
|
||||
|
||||
let
|
||||
# Initial variable configuration
|
||||
varConf = {
|
||||
blocksize = range2 256 1024;
|
||||
gitBranch = [ "garlic/tampi+send+oss+task" ];
|
||||
attachToSocket = [ true false ];
|
||||
interleaveMem = [ true false ];
|
||||
};
|
||||
|
||||
# Generate the complete configuration for each unit
|
||||
genConf = c: targetMachine.config // rec {
|
||||
hw = targetMachine.config.hw;
|
||||
particles = 4 * 1024 * hw.cpusPerSocket;
|
||||
timesteps = 10;
|
||||
|
||||
inherit (c) attachToSocket interleaveMem gitBranch blocksize;
|
||||
|
||||
expName = "nbody-numa";
|
||||
unitName = expName +
|
||||
"-${toString gitBranch}" +
|
||||
"-bs.${toString blocksize}" +
|
||||
"-tpn.${toString ntasksPerNode}" +
|
||||
"-interleave.${if (interleaveMem) then "yes" else "no"}";
|
||||
|
||||
loops = 10;
|
||||
|
||||
qos = "debug";
|
||||
cpusPerTask = if (attachToSocket)
|
||||
then hw.cpusPerSocket
|
||||
else hw.cpusPerNode;
|
||||
ntasksPerNode = if (attachToSocket)
|
||||
then hw.socketsPerNode
|
||||
else 1;
|
||||
nodes = 4;
|
||||
time = "02:00:00";
|
||||
jobName = unitName;
|
||||
};
|
||||
|
||||
common = callPackage ./common.nix {};
|
||||
|
||||
inherit (common) getConfigs pipeline;
|
||||
|
||||
configs = getConfigs {
|
||||
inherit varConf genConf;
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
stdexp.genExperiment { inherit configs pipeline; }
|
58
garlic/exp/nbody/ss.nix
Normal file
58
garlic/exp/nbody/ss.nix
Normal file
@ -0,0 +1,58 @@
|
||||
{
|
||||
stdenv
|
||||
, stdexp
|
||||
, bsc
|
||||
, targetMachine
|
||||
, stages
|
||||
, garlicTools
|
||||
, callPackage
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
with garlicTools;
|
||||
|
||||
let
|
||||
# Initial variable configuration
|
||||
varConf = {
|
||||
blocksize = [ 128 ];
|
||||
nodes = range2 1 16;
|
||||
gitBranch = [
|
||||
# "garlic/mpi+send+oss+task"
|
||||
# "garlic/tampi+send+oss+task"
|
||||
"garlic/tampi+isend+oss+task"
|
||||
];
|
||||
};
|
||||
|
||||
# Generate the complete configuration for each unit
|
||||
genConf = c: targetMachine.config // rec {
|
||||
hw = targetMachine.config.hw;
|
||||
particles = 8 * 1024 * hw.cpusPerSocket;
|
||||
timesteps = 10;
|
||||
|
||||
inherit (c) blocksize nodes gitBranch;
|
||||
|
||||
expName = "nbody-scaling";
|
||||
unitName = expName +
|
||||
"-${toString gitBranch}" +
|
||||
"-nodes${toString nodes}";
|
||||
|
||||
loops = 5;
|
||||
|
||||
qos = "debug";
|
||||
ntasksPerNode = hw.socketsPerNode;
|
||||
time = "02:00:00";
|
||||
cpusPerTask = hw.cpusPerSocket;
|
||||
jobName = unitName;
|
||||
};
|
||||
|
||||
common = callPackage ./common.nix {};
|
||||
|
||||
inherit (common) getConfigs pipeline;
|
||||
|
||||
configs = getConfigs {
|
||||
inherit varConf genConf;
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
stdexp.genExperiment { inherit configs pipeline; }
|
@ -1,65 +0,0 @@
|
||||
{
|
||||
stdenv
|
||||
, stdexp
|
||||
, bsc
|
||||
, targetMachine
|
||||
, stages
|
||||
, garlicTools
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
with garlicTools;
|
||||
|
||||
let
|
||||
# Initial variable configuration
|
||||
varConf = with bsc; {
|
||||
blocksize = [ 512 ];
|
||||
nodes = [ 1 2 4 8 16 ];
|
||||
gitBranch = [
|
||||
"garlic/mpi+send+oss+task"
|
||||
"garlic/tampi+send+oss+task"
|
||||
"garlic/tampi+isend+oss+task"
|
||||
];
|
||||
};
|
||||
|
||||
# Generate the complete configuration for each unit
|
||||
genConf = c: targetMachine.config // rec {
|
||||
hw = targetMachine.config.hw;
|
||||
particles = 16 * 4096 * hw.cpusPerSocket;
|
||||
timesteps = 10;
|
||||
blocksize = c.blocksize;
|
||||
numNodes = c.nodes;
|
||||
gitBranch = c.gitBranch;
|
||||
|
||||
expName = "nbody-scaling";
|
||||
unitName = expName + "-${toString gitBranch}" + "-nodes${toString numNodes}";
|
||||
|
||||
loops = 30;
|
||||
|
||||
nodes = numNodes;
|
||||
qos = "debug";
|
||||
ntasksPerNode = 2;
|
||||
time = "02:00:00";
|
||||
cpusPerTask = hw.cpusPerSocket;
|
||||
jobName = unitName;
|
||||
};
|
||||
|
||||
# Compute the array of configurations
|
||||
configs = stdexp.buildConfigs {
|
||||
inherit varConf genConf;
|
||||
};
|
||||
|
||||
exec = {nextStage, conf, ...}: stages.exec {
|
||||
inherit nextStage;
|
||||
argv = [ "-t" conf.timesteps "-p" conf.particles ];
|
||||
};
|
||||
|
||||
program = {nextStage, conf, ...}: with conf; bsc.garlic.apps.nbody.override {
|
||||
inherit (conf) blocksize gitBranch;
|
||||
};
|
||||
|
||||
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
||||
|
||||
in
|
||||
|
||||
stdexp.genExperiment { inherit configs pipeline; }
|
Loading…
Reference in New Issue
Block a user