forked from rarias/bscpkgs
Update nbody experiment
Generate the input based on the target machine description.
This commit is contained in:
parent
5e50ef19fe
commit
016422cede
@ -4,64 +4,67 @@
|
|||||||
, bsc
|
, bsc
|
||||||
, targetMachine
|
, targetMachine
|
||||||
, stages
|
, stages
|
||||||
|
, garlicTools
|
||||||
, enableJemalloc ? false
|
, enableJemalloc ? false
|
||||||
|
, particles ? null
|
||||||
# Leave the first CPU per socket unused?
|
|
||||||
, freeCpu ? false
|
|
||||||
, particles ? 4096 * 24
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
with garlicTools;
|
||||||
|
|
||||||
let
|
let
|
||||||
# Initial variable configuration
|
|
||||||
varConf = with bsc; {
|
|
||||||
nblocks = [ 12 24 48 96 192 384 768 ];
|
|
||||||
};
|
|
||||||
|
|
||||||
machineConfig = targetMachine.config;
|
machineConfig = targetMachine.config;
|
||||||
|
inherit (machineConfig) hw;
|
||||||
|
|
||||||
|
# Number of cases tested
|
||||||
|
steps = 7;
|
||||||
|
|
||||||
|
# First value for nblocks: we want to begin by using 1/2 blocks/cpu so we set
|
||||||
|
# the first number of blocks to cpusPerSocket / 2
|
||||||
|
nblocks0 = hw.cpusPerSocket / 2;
|
||||||
|
|
||||||
|
# Initial variable configuration
|
||||||
|
varConf = with bsc; {
|
||||||
|
# Create a list with values 2^n with n from 0 to (steps - 1) inclusive
|
||||||
|
i = expRange 2 0 (steps - 1);
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set here the particles, so we don't have an infinite recursion in the
|
||||||
|
# genConf attrset.
|
||||||
|
_particles = if (particles != null)
|
||||||
|
then particles
|
||||||
|
else 4096 * hw.cpusPerSocket;
|
||||||
|
|
||||||
# Generate the complete configuration for each unit
|
# Generate the complete configuration for each unit
|
||||||
genConf = with bsc; c: targetMachine.config // rec {
|
genConf = with bsc; c: targetMachine.config // rec {
|
||||||
expName = "nbody.tampi";
|
expName = "nbody-nblocks";
|
||||||
unitName = "${expName}.nb-${toString nblocks}";
|
unitName = "${expName}${toString nblocks}";
|
||||||
|
|
||||||
inherit (machineConfig) hw;
|
inherit (machineConfig) hw;
|
||||||
# nbody options
|
# nbody options
|
||||||
inherit particles;
|
particles = _particles;
|
||||||
timesteps = 10;
|
timesteps = 10;
|
||||||
inherit (c) nblocks;
|
nblocks = c.i * nblocks0;
|
||||||
totalTasks = ntasksPerNode * nodes;
|
totalTasks = ntasksPerNode * nodes;
|
||||||
particlesPerTask = particles / totalTasks;
|
particlesPerTask = particles / totalTasks;
|
||||||
blocksize = particlesPerTask / nblocks;
|
blocksize = particlesPerTask / nblocks;
|
||||||
assert1 = assertMsg (nblocks >= hw.cpusPerSocket)
|
|
||||||
"nblocks too low: ${toString nblocks} < ${toString hw.cpusPerSocket}";
|
|
||||||
assert2 = assertMsg (particlesPerTask >= nblocks)
|
|
||||||
"too few particles: ${toString particlesPerTask} < ${toString nblocks}";
|
|
||||||
cc = icc;
|
cc = icc;
|
||||||
mpi = impi;
|
mpi = impi;
|
||||||
gitBranch = "garlic/tampi+send+oss+task";
|
gitBranch = "garlic/tampi+send+oss+task";
|
||||||
cflags = "-g";
|
cflags = "-g";
|
||||||
inherit enableJemalloc;
|
inherit enableJemalloc;
|
||||||
|
|
||||||
# Repeat the execution of each unit 30 times
|
# Repeat the execution of each unit 10 times
|
||||||
loops = 10;
|
loops = 10;
|
||||||
|
|
||||||
# Resources
|
# Resources
|
||||||
qos = "debug";
|
qos = "debug";
|
||||||
|
cpusPerTask = hw.cpusPerSocket;
|
||||||
ntasksPerNode = hw.socketsPerNode;
|
ntasksPerNode = hw.socketsPerNode;
|
||||||
nodes = 1;
|
nodes = 1;
|
||||||
time = "02:00:00";
|
|
||||||
|
|
||||||
|
jobName = unitName;
|
||||||
# If we want to leave one CPU per socket unused
|
|
||||||
inherit freeCpu;
|
|
||||||
|
|
||||||
cpuBind = if (freeCpu)
|
|
||||||
then "verbose,mask_cpu:0xfffffe,0xfffffe000000"
|
|
||||||
else "verbose,sockets";
|
|
||||||
|
|
||||||
jobName = "bs-${toString blocksize}-${gitBranch}-nbody";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Compute the array of configurations
|
# Compute the array of configurations
|
||||||
|
17
overlay.nix
17
overlay.nix
@ -312,9 +312,10 @@ let
|
|||||||
tampi = callPackage ./garlic/exp/nbody/tampi.nix { };
|
tampi = callPackage ./garlic/exp/nbody/tampi.nix { };
|
||||||
|
|
||||||
# Experiment variants
|
# Experiment variants
|
||||||
medium = tampi.override { particles = 24 * 4096; };
|
baseline = tampi;
|
||||||
baseline = medium;
|
small = baseline.override { particles = 12 * 4096; };
|
||||||
freeCpu = baseline.override { freeCpu = true; };
|
# TODO: Update freeCpu using a non-standard pipeline
|
||||||
|
#freeCpu = baseline.override { freeCpu = true; };
|
||||||
jemalloc = baseline.override { enableJemalloc = true; };
|
jemalloc = baseline.override { enableJemalloc = true; };
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -357,7 +358,7 @@ let
|
|||||||
nbody = with exp.nbody; {
|
nbody = with exp.nbody; {
|
||||||
baseline = merge [ baseline ];
|
baseline = merge [ baseline ];
|
||||||
jemalloc = merge [ baseline jemalloc ];
|
jemalloc = merge [ baseline jemalloc ];
|
||||||
freeCpu = merge [ baseline freeCpu ];
|
#freeCpu = merge [ baseline freeCpu ];
|
||||||
};
|
};
|
||||||
|
|
||||||
hpcg = with exp.hpcg; {
|
hpcg = with exp.hpcg; {
|
||||||
@ -385,10 +386,10 @@ let
|
|||||||
script = ./garlic/fig/nbody/jemalloc.R;
|
script = ./garlic/fig/nbody/jemalloc.R;
|
||||||
dataset = ds.nbody.jemalloc;
|
dataset = ds.nbody.jemalloc;
|
||||||
};
|
};
|
||||||
freeCpu = pp.rPlot {
|
#freeCpu = pp.rPlot {
|
||||||
script = ./garlic/fig/nbody/freeCpu.R;
|
# script = ./garlic/fig/nbody/freeCpu.R;
|
||||||
dataset = ds.nbody.freeCpu;
|
# dataset = ds.nbody.freeCpu;
|
||||||
};
|
#};
|
||||||
};
|
};
|
||||||
|
|
||||||
hpcg = {
|
hpcg = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user