Add OSU test benchmarks

This commit is contained in:
Rodrigo Arias 2020-08-18 18:28:30 +02:00
parent ecc01e4314
commit 1e07be863a
7 changed files with 134 additions and 10 deletions

View File

@ -7,6 +7,7 @@
app app
, env ? "" , env ? ""
, argv # bash array as string, example: argv=''(-f "file with spaces" -t 10)'' , argv # bash array as string, example: argv=''(-f "file with spaces" -t 10)''
, program ? "bin/run"
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
@ -23,7 +24,7 @@ stdenv.mkDerivation {
${env} ${env}
argv=${argv} argv=${argv}
exec ${app}/bin/run \''${argv[@]} exec ${app}/${program} \''${argv[@]}
EOF EOF
chmod +x $out/bin/run chmod +x $out/bin/run
''; '';

View File

@ -36,6 +36,9 @@ let
bs = callPackage ./exp/nbody/bs.nix { }; bs = callPackage ./exp/nbody/bs.nix { };
mpi = callPackage ./exp/nbody/mpi.nix { }; mpi = callPackage ./exp/nbody/mpi.nix { };
}; };
osu = {
latency = callPackage ./exp/osu/latency.nix { };
};
}; };
}; };

View File

@ -18,13 +18,17 @@ let
config = { config = {
cc = [ bsc.icc ]; cc = [ bsc.icc ];
blocksize = [ 2048 ]; blocksize = [ 2048 ];
mpi = [ bsc.impi bsc.openmpi bsc.mpich ];
}; };
extraConfig = { extraConfig = {
particles = 16384; particles = 32*1024;
timesteps = 10; timesteps = 10;
ntasks = 2; ntasksPerNode = 2;
mpi = bsc.impi; nodes = 1;
time = "00:10:00";
qos = "debug";
#mpi = bsc.impi;
#mpi = bsc.openmpi; #mpi = bsc.openmpi;
gitBranch = "garlic/mpi+send"; gitBranch = "garlic/mpi+send";
gitURL = "ssh://git@bscpm02.bsc.es/garlic/apps/nbody.git"; gitURL = "ssh://git@bscpm02.bsc.es/garlic/apps/nbody.git";
@ -37,7 +41,10 @@ let
app = app; app = app;
nixPrefix = "/gpfs/projects/bsc15/nix"; nixPrefix = "/gpfs/projects/bsc15/nix";
exclusive = false; exclusive = false;
ntasks = "${toString conf.ntasks}"; ntasksPerNode = "${toString conf.ntasksPerNode}";
nodes = "${toString conf.nodes}";
time = conf.time;
qos = conf.qos;
chdirPrefix = "/home/bsc15/bsc15557/bsc-nixpkgs/out"; chdirPrefix = "/home/bsc15/bsc15557/bsc-nixpkgs/out";
}; };
@ -61,7 +68,7 @@ let
nbody.override { inherit cc mpi blocksize gitBranch gitURL; }; nbody.override { inherit cc mpi blocksize gitBranch gitURL; };
pipeline = conf: pipeline = conf:
# sbatch conf ( sbatch conf (
srun ( srun (
nixsetupWrapper ( nixsetupWrapper (
argv conf ( argv conf (
@ -69,7 +76,7 @@ let
) )
) )
) )
# ) )
; ;
# Ideally it should look like this: # Ideally it should look like this:

View File

@ -0,0 +1,70 @@
{
bsc
, genApp
, genConfigs
# Wrappers
, launchWrapper
, sbatchWrapper
, srunWrapper
, argvWrapper
, controlWrapper
, nixsetupWrapper
}:
let
# Set the configuration for the experiment
config = {
mpi = [ bsc.impi bsc.openmpi bsc.mpich ];
};
extraConfig = {
ntasksPerNode = 1;
nodes = 2;
time = "00:10:00";
qos = "debug";
};
# Compute the cartesian product of all configurations
configs = map (conf: conf // extraConfig) (genConfigs config);
sbatch = conf: app: sbatchWrapper {
app = app;
nixPrefix = "/gpfs/projects/bsc15/nix";
exclusive = false;
ntasksPerNode = "${toString conf.ntasksPerNode}";
nodes = "${toString conf.nodes}";
time = conf.time;
qos = conf.qos;
chdirPrefix = "/home/bsc15/bsc15557/bsc-nixpkgs/out";
};
srun = app: srunWrapper {
app = app;
nixPrefix = "/gpfs/projects/bsc15/nix";
};
argv = app:
argvWrapper {
app = app;
program = "bin/osu_latency";
argv = "()";
env = ''
export I_MPI_THREAD_SPLIT=1
'';
};
osumbFn = conf:
with conf;
bsc.osumb.override { inherit mpi; };
pipeline = conf: srun (nixsetupWrapper (argv (osumbFn conf)));
#pipeline = conf: sbatch conf (srun (nixsetupWrapper (argv bsc.osumb)));
# Ideally it should look like this:
#pipeline = sbatch nixsetup control argv nbodyFn;
jobs = map pipeline configs;
in
launchWrapper jobs

View File

@ -10,6 +10,7 @@
, argv ? "" , argv ? ""
, binary ? "/bin/run" , binary ? "/bin/run"
, ntasks ? null , ntasks ? null
, ntasksPerNode ? null
, nodes ? null , nodes ? null
, exclusive ? true # By default we run in exclusive mode , exclusive ? true # By default we run in exclusive mode
, qos ? null , qos ? null
@ -51,6 +52,7 @@ stdenv.mkDerivation rec {
#SBATCH --job-name="${name}" #SBATCH --job-name="${name}"
'' ''
+ sbatchOpt "ntasks" ntasks + sbatchOpt "ntasks" ntasks
+ sbatchOpt "ntasks-per-node" ntasksPerNode
+ sbatchOpt "nodes" nodes + sbatchOpt "nodes" nodes
+ sbatchOpt "chdir" "${chdirPrefix}/$(basename $out)" + sbatchOpt "chdir" "${chdirPrefix}/$(basename $out)"
+ sbatchOpt "output" output + sbatchOpt "output" output

38
bsc/osu/default.nix Normal file
View File

@ -0,0 +1,38 @@
{
stdenv,
fetchurl,
mpi
}:
stdenv.mkDerivation rec {
version = "5.6.3";
name = "osu-micro-benchmarks-${version}";
src = fetchurl {
url = "http://mvapich.cse.ohio-state.edu/download/mvapich/osu-micro-benchmarks-${version}.tar.gz";
sha256 = "1f5fc252c0k4rd26xh1v5017wfbbsr2w7jm49x8yigc6n32sisn5";
};
doCheck = true;
enableParallelBuilding = true;
buildInputs = [ mpi ];
configureFlags = [
"CC=${mpi}/bin/mpicc"
"CXX=${mpi}/bin/mpicxx"
];
postInstall = ''
mkdir -p $out/bin
cp $out/libexec/osu-micro-benchmarks/mpi/one-sided/* $out/bin/
cp $out/libexec/osu-micro-benchmarks/mpi/collective/* $out/bin/
cp $out/libexec/osu-micro-benchmarks/mpi/pt2pt/* $out/bin/
cp $out/libexec/osu-micro-benchmarks/mpi/startup/* $out/bin/
'';
meta = {
description = "OSU Micro-Benchmarks";
homepage = http://mvapich.cse.ohio-state.edu/benchmarks/;
maintainers = [ ];
platforms = stdenv.lib.platforms.all;
};
}

View File

@ -9,9 +9,8 @@ let
self.bsc = rec { self.bsc = rec {
# Load the default implementation # Load the default implementation
#mpi = pkgs.mpich; #mpi = mpich;
#mpi = pkgs.openmpi; #mpi = openmpi;
#mpi = openmpi; # Our OpenMPI variant
mpi = intel-mpi; mpi = intel-mpi;
# Load the default compiler # Load the default compiler
@ -37,6 +36,10 @@ let
pscom = callPackage ./bsc/parastation/pscom.nix { }; pscom = callPackage ./bsc/parastation/pscom.nix { };
psmpi = callPackage ./bsc/parastation/psmpi.nix { }; psmpi = callPackage ./bsc/parastation/psmpi.nix { };
osumb = callPackage ./bsc/osu/default.nix { };
mpich = pkgs.mpich;
# Default Intel MPI version is 2019 (the last one) # Default Intel MPI version is 2019 (the last one)
impi = intel-mpi; impi = intel-mpi;
intel-mpi = intel-mpi-2019; intel-mpi = intel-mpi-2019;