From 30630a74be1c8256d6b412fdcdc3810a78c6d7b9 Mon Sep 17 00:00:00 2001 From: Sandra Date: Wed, 7 Oct 2020 11:38:02 +0200 Subject: [PATCH 1/4] Saiph: Vectorisation compiler info flags --- garlic/saiph/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/garlic/saiph/default.nix b/garlic/saiph/default.nix index 3028042..c8a8a0a 100644 --- a/garlic/saiph/default.nix +++ b/garlic/saiph/default.nix @@ -8,6 +8,8 @@ , boost , gitBranch ? "master" , numComm ? null +, vectFlags ? null +#, breakpointHook }: stdenv.mkDerivation rec { @@ -33,6 +35,7 @@ stdenv.mkDerivation rec { cc vtk boost +# breakpointHook ]; # Required for nanos6 @@ -50,6 +53,7 @@ stdenv.mkDerivation rec { "apps" "APP=ExHeat3D" ( if (numComm != null) then "NUM_COMM=${toString numComm}" else "" ) + ( if (vectFlags != null) then "VECT_FLAGS=${toString vectFlags}" else "" ) ]; installPhase = '' From 8f650301617f8831840c2fdea14f4b2218633d62 Mon Sep 17 00:00:00 2001 From: Sandra Date: Wed, 7 Oct 2020 11:38:57 +0200 Subject: [PATCH 2/4] Saiph: numcomm experiment changes --- garlic/exp/saiph/numcomm.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/garlic/exp/saiph/numcomm.nix b/garlic/exp/saiph/numcomm.nix index 07e108c..fe0e63a 100644 --- a/garlic/exp/saiph/numcomm.nix +++ b/garlic/exp/saiph/numcomm.nix @@ -23,11 +23,11 @@ let # Resources ntasksPerNode = "2"; - nodes = "2"; + nodes = "1"; # Stage configuration enableSbatch = true; - enableControl = false; + enableControl = true; enableExtrae = false; enablePerf = false; @@ -63,7 +63,8 @@ let ); control = {stage, conf, ...}: with conf; w.control { - program = stageProgram stage; + program = stageProgram stage; + loops = 100; }; srun = {stage, conf, ...}: with conf; w.srun { @@ -127,6 +128,7 @@ let argv = {stage, conf, ...}: with conf; w.argv { program = stageProgram stage; env = '' + export OMP_NUM_THREADS=24 export NANOS6_REPORT_PREFIX="#" export I_MPI_THREAD_SPLIT=1 export ASAN_SYMBOLIZER_PATH=${pkgs.bsc.clangOmpss2Unwrapped}/bin/llvm-symbolizer From ec555e59e7354d433dd57777479a07fc7e03383f Mon Sep 17 00:00:00 2001 From: Sandra Date: Wed, 7 Oct 2020 11:53:47 +0200 Subject: [PATCH 3/4] Setting a developer mode and its implication --- NOISE | 16 ++++++++++++++++ garlic/exp/saiph/numcomm.nix | 3 ++- garlic/saiph/default.nix | 20 +++++++++++--------- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/NOISE b/NOISE index cab9f35..a4cf4cd 100644 --- a/NOISE +++ b/NOISE @@ -108,3 +108,19 @@ ABSTRACT Do not use to ensure reproducibility. /* vim: set ts=2 sw=2 tw=72 fo=watqc expandtab spell autoindent: */ + +1.8 Nix compilation environment + + When using local repo as src code, (e.g. developer mode on) a make + clean at the preBuild stage is required. + + Nix sets the current date to the files copied from repos. + Makefile checks the files modification date in order to call or not + the compilation instructions. + If any object/binary file exists out of Nix, at the time we build + within Nix, they will be copied with the current data and consequently + not updated during the Nix compilation process. + + See saiph devMode option and its implications at + bscpkgs/garlic/saiph/default.nix + diff --git a/garlic/exp/saiph/numcomm.nix b/garlic/exp/saiph/numcomm.nix index fe0e63a..7da9d9c 100644 --- a/garlic/exp/saiph/numcomm.nix +++ b/garlic/exp/saiph/numcomm.nix @@ -12,6 +12,7 @@ with stdenv.lib; let # Set variable configuration for the experiment varConfig = { + devMode = [ true ]; numComm = [ 1 ]; }; @@ -148,7 +149,7 @@ let }); in customPkgs.bsc.garlic.saiph.override { - inherit numComm mpi gitBranch; + inherit devMode numComm mpi gitBranch; }; stages = with common; [] diff --git a/garlic/saiph/default.nix b/garlic/saiph/default.nix index c8a8a0a..c9f3cad 100644 --- a/garlic/saiph/default.nix +++ b/garlic/saiph/default.nix @@ -6,6 +6,7 @@ , cc , vtk , boost +, devMode ? false , gitBranch ? "master" , numComm ? null , vectFlags ? null @@ -15,13 +16,13 @@ stdenv.mkDerivation rec { name = "saiph"; - src = builtins.fetchGit { - url = "ssh://git@bscpm02.bsc.es/DSLs/saiph.git"; - ref = "${gitBranch}"; - }; + src = (if (devMode == true) then ~/repos/saiph + else + builtins.fetchGit { + url = "ssh://git@bscpm02.bsc.es/DSLs/saiph.git"; + ref = "${gitBranch}"; + }); - #src = /tmp/saiph; - programPath = "/bin/ExHeat3D"; enableParallelBuilding = true; @@ -42,11 +43,12 @@ stdenv.mkDerivation rec { hardeningDisable = [ "bindnow" ]; preBuild = '' - cd saiphv2/cpp/src - + cd saiphv2/cpp/src export VTK_VERSION=8.2 export VTK_HOME=${vtk} - ''; + '' + + (if (devMode == true) then "make clean" else "") + ; makeFlags = [ "-f" "Makefile.${cc.cc.CC}" From c36fc8a08b03db37735bdedaa6f5f0f7f1cf444d Mon Sep 17 00:00:00 2001 From: Sandra Date: Wed, 7 Oct 2020 14:53:06 +0200 Subject: [PATCH 4/4] NOISE verbose fixes --- NOISE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NOISE b/NOISE index a4cf4cd..2d5cd6c 100644 --- a/NOISE +++ b/NOISE @@ -109,12 +109,12 @@ ABSTRACT /* vim: set ts=2 sw=2 tw=72 fo=watqc expandtab spell autoindent: */ -1.8 Nix compilation environment +1.8 Make doesn't rebuild objects When using local repo as src code, (e.g. developer mode on) a make clean at the preBuild stage is required. - Nix sets the current date to the files copied from repos. + Nix sets the same modification date (one second after the Epoch (1970-01-01 at 00:00:01 in UTC timezone) to all the files in the nix store (also those copied from repos). Makefile checks the files modification date in order to call or not the compilation instructions. If any object/binary file exists out of Nix, at the time we build