WIP: Add mpi, omp and mpi+omp experiments. See more.
Seems that gcc compilation with OpenMP throws an error. Investigate. I think I've forgot to add an override of mpicxx compiler backend
This commit is contained in:
parent
01b2584688
commit
e20061254b
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
stdenv
|
stdenv
|
||||||
, cc
|
, cc
|
||||||
, mpi
|
, mpi ? null
|
||||||
, gitBranch ? "garlic/seq"
|
, gitBranch
|
||||||
, makefileName ? "Linux_Serial"
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "hpcg";
|
name = "hpcg";
|
||||||
|
|
||||||
@ -20,8 +20,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
cc
|
cc
|
||||||
mpi
|
]
|
||||||
];
|
++ optional (mpi != null) mpi;
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"CC=${cc.cc.CC}"
|
"CC=${cc.cc.CC}"
|
||||||
@ -30,12 +30,6 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
configurePhase = ''
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
../configure ${makefileName}
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp bin/* $out/bin/
|
cp bin/* $out/bin/
|
||||||
|
63
garlic/exp/hpcg/mpi+omp.nix
Normal file
63
garlic/exp/hpcg/mpi+omp.nix
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
{
|
||||||
|
stdenv
|
||||||
|
, stdexp
|
||||||
|
, bsc
|
||||||
|
, targetMachine
|
||||||
|
, stages
|
||||||
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
# Initial variable configuration
|
||||||
|
varConf = with bsc; {
|
||||||
|
n = [ 104 64 ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Generate the complete configuration for each unit
|
||||||
|
genConf = with bsc; c: targetMachine.config // rec {
|
||||||
|
# hpcg options
|
||||||
|
n = c.n;
|
||||||
|
cc = icc;
|
||||||
|
mpi = impi;
|
||||||
|
gitBranch = "garlic/mpi+omp";
|
||||||
|
|
||||||
|
# Repeat the execution of each unit 30 times
|
||||||
|
loops = 30;
|
||||||
|
|
||||||
|
# Resources
|
||||||
|
qos = "debug";
|
||||||
|
ntasksPerNode = 48;
|
||||||
|
nodes = 1;
|
||||||
|
time = "02:00:00";
|
||||||
|
cpuBind = "sockets,verbose";
|
||||||
|
jobName = "hpcg-${toString n}-${gitBranch}";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Compute the array of configurations
|
||||||
|
configs = stdexp.buildConfigs {
|
||||||
|
inherit varConf genConf;
|
||||||
|
};
|
||||||
|
|
||||||
|
exec = {nextStage, conf, ...}: with conf; stages.exec {
|
||||||
|
inherit nextStage;
|
||||||
|
argv = [
|
||||||
|
"--nx=${toString n}"
|
||||||
|
"--ny=${toString n}"
|
||||||
|
"--nz=${toString n}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
program = {nextStage, conf, ...}: with conf;
|
||||||
|
let
|
||||||
|
customPkgs = stdexp.replaceMpi conf.mpi;
|
||||||
|
in
|
||||||
|
customPkgs.apps.hpcg.override {
|
||||||
|
inherit cc mpi gitBranch;
|
||||||
|
};
|
||||||
|
|
||||||
|
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
stdexp.genExperiment { inherit configs pipeline; }
|
@ -21,8 +21,6 @@ let
|
|||||||
cc = icc;
|
cc = icc;
|
||||||
mpi = impi;
|
mpi = impi;
|
||||||
gitBranch = "garlic/mpi";
|
gitBranch = "garlic/mpi";
|
||||||
# FIXME: fix this option in the garlic/mpi git branch
|
|
||||||
makefileName = "MPI";
|
|
||||||
|
|
||||||
# Repeat the execution of each unit 30 times
|
# Repeat the execution of each unit 30 times
|
||||||
loops = 30;
|
loops = 30;
|
||||||
@ -55,11 +53,11 @@ let
|
|||||||
customPkgs = stdexp.replaceMpi conf.mpi;
|
customPkgs = stdexp.replaceMpi conf.mpi;
|
||||||
in
|
in
|
||||||
customPkgs.apps.hpcg.override {
|
customPkgs.apps.hpcg.override {
|
||||||
inherit cc mpi gitBranch makefileName;
|
inherit cc mpi gitBranch;
|
||||||
};
|
};
|
||||||
|
|
||||||
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
stdexp.genExperiment { inherit configs pipeline; }
|
stdexp.genExperiment { inherit configs pipeline; }
|
||||||
|
63
garlic/exp/hpcg/omp.nix
Normal file
63
garlic/exp/hpcg/omp.nix
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
{
|
||||||
|
stdenv
|
||||||
|
, stdexp
|
||||||
|
, bsc
|
||||||
|
, targetMachine
|
||||||
|
, stages
|
||||||
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
# Initial variable configuration
|
||||||
|
varConf = with bsc; {
|
||||||
|
n = [ 104 64 ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Generate the complete configuration for each unit
|
||||||
|
genConf = with bsc; c: targetMachine.config // rec {
|
||||||
|
# hpcg options
|
||||||
|
n = c.n;
|
||||||
|
cc = icc;
|
||||||
|
mpi = null; # TODO: Remove this for omp
|
||||||
|
gitBranch = "garlic/seq";
|
||||||
|
|
||||||
|
# Repeat the execution of each unit 30 times
|
||||||
|
loops = 30;
|
||||||
|
|
||||||
|
# Resources
|
||||||
|
qos = "debug";
|
||||||
|
ntasksPerNode = 48;
|
||||||
|
nodes = 1;
|
||||||
|
time = "02:00:00";
|
||||||
|
cpuBind = "sockets,verbose";
|
||||||
|
jobName = "hpcg-${toString n}-${gitBranch}";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Compute the array of configurations
|
||||||
|
configs = stdexp.buildConfigs {
|
||||||
|
inherit varConf genConf;
|
||||||
|
};
|
||||||
|
|
||||||
|
exec = {nextStage, conf, ...}: with conf; stages.exec {
|
||||||
|
inherit nextStage;
|
||||||
|
argv = [
|
||||||
|
"--nx=${toString n}"
|
||||||
|
"--ny=${toString n}"
|
||||||
|
"--nz=${toString n}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
program = {nextStage, conf, ...}: with conf;
|
||||||
|
let
|
||||||
|
customPkgs = stdexp.replaceMpi conf.mpi;
|
||||||
|
in
|
||||||
|
customPkgs.apps.hpcg.override {
|
||||||
|
inherit cc gitBranch;
|
||||||
|
};
|
||||||
|
|
||||||
|
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
stdexp.genExperiment { inherit configs pipeline; }
|
@ -19,7 +19,7 @@ let
|
|||||||
# hpcg options
|
# hpcg options
|
||||||
n = c.n;
|
n = c.n;
|
||||||
cc = icc;
|
cc = icc;
|
||||||
mpi = impi;
|
mpi = null; # TODO: Remove this for serial
|
||||||
gitBranch = "garlic/seq";
|
gitBranch = "garlic/seq";
|
||||||
|
|
||||||
# Repeat the execution of each unit 30 times
|
# Repeat the execution of each unit 30 times
|
||||||
@ -59,5 +59,5 @@ let
|
|||||||
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
stdexp.genExperiment { inherit configs pipeline; }
|
stdexp.genExperiment { inherit configs pipeline; }
|
||||||
|
@ -199,7 +199,8 @@ let
|
|||||||
|
|
||||||
hpcg = callPackage ./garlic/apps/hpcg/default.nix {
|
hpcg = callPackage ./garlic/apps/hpcg/default.nix {
|
||||||
cc = self.bsc.icc;
|
cc = self.bsc.icc;
|
||||||
gitBranch = "garlic/seq";
|
mpi = self.bsc.impi;
|
||||||
|
gitBranch = "garlic/mpi+omp";
|
||||||
};
|
};
|
||||||
|
|
||||||
# heat = callPackage ./garlic/apps/heat {
|
# heat = callPackage ./garlic/apps/heat {
|
||||||
@ -262,8 +263,8 @@ let
|
|||||||
hpcg = {
|
hpcg = {
|
||||||
serial = callPackage ./garlic/exp/hpcg/serial.nix { };
|
serial = callPackage ./garlic/exp/hpcg/serial.nix { };
|
||||||
mpi = callPackage ./garlic/exp/hpcg/mpi.nix { };
|
mpi = callPackage ./garlic/exp/hpcg/mpi.nix { };
|
||||||
# omp = callPackage ./garlic/exp/hpcg/omp.nix { };
|
omp = callPackage ./garlic/exp/hpcg/omp.nix { };
|
||||||
# mpi+omp = callPackage ./garlic/exp/hpcg/mpi+omp.nix { };
|
mpi_omp = callPackage ./garlic/exp/hpcg/mpi+omp.nix { };
|
||||||
};
|
};
|
||||||
|
|
||||||
test = {
|
test = {
|
||||||
|
Loading…
Reference in New Issue
Block a user