From ea0272c2122244a9d47301fb102323fc1dbecf04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Pe=C3=B1acoba?= Date: Thu, 22 Oct 2020 13:32:20 +0200 Subject: [PATCH] Add OmpSs-2 (no mpi) version --- garlic/apps/hpcg/default.nix | 4 +++ garlic/exp/hpcg/oss.nix | 68 ++++++++++++++++++++++++++++++++++++ overlay.nix | 21 +++++++++-- 3 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 garlic/exp/hpcg/oss.nix diff --git a/garlic/apps/hpcg/default.nix b/garlic/apps/hpcg/default.nix index 6dc697c..3d62904 100644 --- a/garlic/apps/hpcg/default.nix +++ b/garlic/apps/hpcg/default.nix @@ -1,6 +1,8 @@ { stdenv , cc +, nanos6 ? null +, mcxx ? null , mpi ? null , gitBranch }: @@ -21,6 +23,8 @@ stdenv.mkDerivation rec { buildInputs = [ cc ] + ++ optional (mcxx != null) mcxx + ++ optional (nanos6 != null) nanos6 ++ optional (mpi != null) mpi; makeFlags = [ diff --git a/garlic/exp/hpcg/oss.nix b/garlic/exp/hpcg/oss.nix new file mode 100644 index 0000000..e30c6de --- /dev/null +++ b/garlic/exp/hpcg/oss.nix @@ -0,0 +1,68 @@ +{ + stdenv +, stdexp +, bsc +, targetMachine +, stages +}: + +with stdenv.lib; + +let + # Initial variable configuration + varConf = with bsc; { + n = [ 200 104 64 ]; + nblocks = [ 128 ]; + }; + + # Generate the complete configuration for each unit + genConf = with bsc; c: targetMachine.config // rec { + # hpcg options + n = c.n; + nblocks = c.nblocks; + cc = bsc.icc; + mcxx = bsc.mcxx; + nanos6 = bsc.nanos6; + mpi = null; # TODO: Remove this for oss + gitBranch = "garlic/oss"; + + # 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}" + "--nblocks=${toString nblocks}" + ]; + }; + + program = {nextStage, conf, ...}: with conf; + let + customPkgs = stdexp.replaceMpi conf.mpi; + in + customPkgs.apps.hpcg.override { + inherit cc nanos6 mcxx gitBranch; + }; + + pipeline = stdexp.stdPipeline ++ [ exec program ]; + +in + + stdexp.genExperiment { inherit configs pipeline; } diff --git a/overlay.nix b/overlay.nix index 3e782c9..152ddf9 100644 --- a/overlay.nix +++ b/overlay.nix @@ -199,8 +199,24 @@ let hpcg = callPackage ./garlic/apps/hpcg/default.nix { cc = self.bsc.icc; - mpi = self.bsc.impi; - gitBranch = "garlic/mpi+omp"; + mcxx = self.bsc.mcxx; + nanos6 = self.bsc.nanos6; + gitBranch = "garlic/oss"; + + # cc = self.bsc.icc; + # gitBranch = "garlic/seq"; + + # cc = self.bsc.icc; + # mpi = self.bsc.mpi; + # gitBranch = "garlic/mpi"; + + # cc = self.bsc.icc; + # gitBranch = "garlic/omp"; + + # cc = self.bsc.icc; + # mpi = self.bsc.mpi; + # gitBranch = "garlic/mpi+omp"; + }; # heat = callPackage ./garlic/apps/heat { @@ -265,6 +281,7 @@ let mpi = callPackage ./garlic/exp/hpcg/mpi.nix { }; omp = callPackage ./garlic/exp/hpcg/omp.nix { }; mpi_omp = callPackage ./garlic/exp/hpcg/mpi+omp.nix { }; + oss = callPackage ./garlic/exp/hpcg/oss.nix { }; }; test = {