osu: add multithread benchmark

This commit is contained in:
Rodrigo Arias 2021-03-01 11:55:13 +01:00
parent 8373751f67
commit a36d912022
2 changed files with 23 additions and 4 deletions

View File

@ -95,7 +95,10 @@
test = callPackage ./lulesh/test.nix { }; test = callPackage ./lulesh/test.nix { };
}; };
osu = { osu = rec {
latency = callPackage ./osu/latency.nix { }; latency = callPackage ./osu/latency.nix { };
latencyShm = latency.override { interNode = false; };
latencyMt = latency.override { enableMultithread = true; };
latencyMtShm = latency.override { enableMultithread = true; interNode = true; };
}; };
} }

View File

@ -7,9 +7,16 @@
# Should we test the network (true) or the shared memory (false)? # Should we test the network (true) or the shared memory (false)?
, interNode ? true , interNode ? true
, enableMultithread ? false
}: }:
with builtins;
with stdenv.lib;
let let
machineConfig = targetMachine.config;
# Initial variable configuration # Initial variable configuration
varConf = with bsc; { varConf = with bsc; {
mpi = [ impi bsc.openmpi mpich ]; #psmpi ]; mpi = [ impi bsc.openmpi mpich ]; #psmpi ];
@ -17,9 +24,10 @@ let
# 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 {
inherit (machineConfig) hw;
nodes = if interNode then 2 else 1; nodes = if interNode then 2 else 1;
ntasksPerNode = if interNode then 1 else 2; ntasksPerNode = if interNode then 1 else 2;
cpusPerTask = 1; cpusPerTask = if (enableMultithread) then hw.cpusPerSocket else 1;
time = "00:10:00"; time = "00:10:00";
qos = "debug"; qos = "debug";
loops = 30; loops = 30;
@ -27,6 +35,7 @@ let
unitName = expName; unitName = expName;
jobName = expName; jobName = expName;
inherit (c) mpi; inherit (c) mpi;
inherit enableMultithread;
}; };
# Compute the array of configurations # Compute the array of configurations
@ -36,8 +45,15 @@ let
exec = {nextStage, conf, ...}: with conf; stages.exec { exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage; inherit nextStage;
# We simply run the osu_latency test
program = "${nextStage}/bin/osu_latency"; program = if (enableMultithread) then
"${nextStage}/bin/osu_latency_mt"
else
"${nextStage}/bin/osu_latency";
argv = optionals (enableMultithread) [
"-t" "${toString conf.cpusPerTask}:${toString conf.cpusPerTask}"
];
}; };
program = {nextStage, conf, ...}: bsc.osumb.override { program = {nextStage, conf, ...}: bsc.osumb.override {