Merge branch 'saiph' into 'master'

Saiph

See merge request rarias/bscpkgs!3
This commit is contained in:
Rodrigo Arias Mallo 2020-10-07 14:56:33 +02:00
commit 4ce514de9b
3 changed files with 38 additions and 13 deletions

16
NOISE
View File

@ -108,3 +108,19 @@ ABSTRACT
Do not use to ensure reproducibility. Do not use to ensure reproducibility.
/* vim: set ts=2 sw=2 tw=72 fo=watqc expandtab spell autoindent: */ /* vim: set ts=2 sw=2 tw=72 fo=watqc expandtab spell autoindent: */
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 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
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

View File

@ -12,6 +12,7 @@ with stdenv.lib;
let let
# Set variable configuration for the experiment # Set variable configuration for the experiment
varConfig = { varConfig = {
devMode = [ true ];
numComm = [ 1 ]; numComm = [ 1 ];
}; };
@ -23,11 +24,11 @@ let
# Resources # Resources
ntasksPerNode = "2"; ntasksPerNode = "2";
nodes = "2"; nodes = "1";
# Stage configuration # Stage configuration
enableSbatch = true; enableSbatch = true;
enableControl = false; enableControl = true;
enableExtrae = false; enableExtrae = false;
enablePerf = false; enablePerf = false;
@ -64,6 +65,7 @@ let
control = {stage, conf, ...}: with conf; w.control { control = {stage, conf, ...}: with conf; w.control {
program = stageProgram stage; program = stageProgram stage;
loops = 100;
}; };
srun = {stage, conf, ...}: with conf; w.srun { srun = {stage, conf, ...}: with conf; w.srun {
@ -127,6 +129,7 @@ let
argv = {stage, conf, ...}: with conf; w.argv { argv = {stage, conf, ...}: with conf; w.argv {
program = stageProgram stage; program = stageProgram stage;
env = '' env = ''
export OMP_NUM_THREADS=24
export NANOS6_REPORT_PREFIX="#" export NANOS6_REPORT_PREFIX="#"
export I_MPI_THREAD_SPLIT=1 export I_MPI_THREAD_SPLIT=1
export ASAN_SYMBOLIZER_PATH=${pkgs.bsc.clangOmpss2Unwrapped}/bin/llvm-symbolizer export ASAN_SYMBOLIZER_PATH=${pkgs.bsc.clangOmpss2Unwrapped}/bin/llvm-symbolizer
@ -146,7 +149,7 @@ let
}); });
in in
customPkgs.bsc.garlic.saiph.override { customPkgs.bsc.garlic.saiph.override {
inherit numComm mpi gitBranch; inherit devMode numComm mpi gitBranch;
}; };
stages = with common; [] stages = with common; []

View File

@ -6,19 +6,22 @@
, cc , cc
, vtk , vtk
, boost , boost
, devMode ? false
, gitBranch ? "master" , gitBranch ? "master"
, numComm ? null , numComm ? null
, vectFlags ? null
#, breakpointHook
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "saiph"; name = "saiph";
src = builtins.fetchGit { src = (if (devMode == true) then ~/repos/saiph
else
builtins.fetchGit {
url = "ssh://git@bscpm02.bsc.es/DSLs/saiph.git"; url = "ssh://git@bscpm02.bsc.es/DSLs/saiph.git";
ref = "${gitBranch}"; ref = "${gitBranch}";
}; });
#src = /tmp/saiph;
programPath = "/bin/ExHeat3D"; programPath = "/bin/ExHeat3D";
@ -33,6 +36,7 @@ stdenv.mkDerivation rec {
cc cc
vtk vtk
boost boost
# breakpointHook
]; ];
# Required for nanos6 # Required for nanos6
@ -40,16 +44,18 @@ stdenv.mkDerivation rec {
preBuild = '' preBuild = ''
cd saiphv2/cpp/src cd saiphv2/cpp/src
export VTK_VERSION=8.2 export VTK_VERSION=8.2
export VTK_HOME=${vtk} export VTK_HOME=${vtk}
''; ''
+ (if (devMode == true) then "make clean" else "")
;
makeFlags = [ makeFlags = [
"-f" "Makefile.${cc.cc.CC}" "-f" "Makefile.${cc.cc.CC}"
"apps" "apps"
"APP=ExHeat3D" "APP=ExHeat3D"
( if (numComm != null) then "NUM_COMM=${toString numComm}" else "" ) ( if (numComm != null) then "NUM_COMM=${toString numComm}" else "" )
( if (vectFlags != null) then "VECT_FLAGS=${toString vectFlags}" else "" )
]; ];
installPhase = '' installPhase = ''