2020-06-30 12:19:36 +02:00
|
|
|
{
|
|
|
|
stdenv
|
|
|
|
, nanos6
|
|
|
|
, mpi
|
|
|
|
, tampi
|
2020-09-23 13:10:12 +02:00
|
|
|
, cc
|
2020-06-30 12:19:36 +02:00
|
|
|
, vtk
|
|
|
|
, boost
|
2020-09-21 17:30:24 +02:00
|
|
|
, gitBranch ? "master"
|
|
|
|
, numComm ? null
|
2020-10-07 11:38:02 +02:00
|
|
|
, vectFlags ? null
|
|
|
|
#, breakpointHook
|
2020-06-30 12:19:36 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-07-02 14:47:10 +02:00
|
|
|
name = "saiph";
|
2020-06-30 12:19:36 +02:00
|
|
|
|
2020-07-03 11:13:41 +02:00
|
|
|
src = builtins.fetchGit {
|
|
|
|
url = "ssh://git@bscpm02.bsc.es/DSLs/saiph.git";
|
2020-09-21 17:30:24 +02:00
|
|
|
ref = "${gitBranch}";
|
2020-07-03 11:13:41 +02:00
|
|
|
};
|
2020-06-30 12:19:36 +02:00
|
|
|
|
2020-07-03 11:13:41 +02:00
|
|
|
#src = /tmp/saiph;
|
2020-09-21 17:30:24 +02:00
|
|
|
|
|
|
|
programPath = "/bin/ExHeat3D";
|
2020-06-30 12:19:36 +02:00
|
|
|
|
2020-09-21 19:23:17 +02:00
|
|
|
enableParallelBuilding = true;
|
2020-07-02 14:47:10 +02:00
|
|
|
dontStrip = true;
|
2020-07-03 11:13:41 +02:00
|
|
|
enableDebugging = true;
|
2020-06-30 12:19:36 +02:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
nanos6
|
|
|
|
mpi
|
|
|
|
tampi
|
2020-09-23 13:10:12 +02:00
|
|
|
cc
|
2020-06-30 12:19:36 +02:00
|
|
|
vtk
|
|
|
|
boost
|
2020-10-07 11:38:02 +02:00
|
|
|
# breakpointHook
|
2020-06-30 12:19:36 +02:00
|
|
|
];
|
|
|
|
|
2020-09-21 19:23:17 +02:00
|
|
|
# Required for nanos6
|
|
|
|
hardeningDisable = [ "bindnow" ];
|
2020-09-21 17:30:24 +02:00
|
|
|
|
2020-07-02 15:54:41 +02:00
|
|
|
preBuild = ''
|
2020-06-30 12:19:36 +02:00
|
|
|
cd saiphv2/cpp/src
|
2020-07-03 11:13:41 +02:00
|
|
|
|
2020-07-02 14:47:10 +02:00
|
|
|
export VTK_VERSION=8.2
|
|
|
|
export VTK_HOME=${vtk}
|
2020-06-30 12:19:36 +02:00
|
|
|
'';
|
|
|
|
|
2020-07-02 15:54:41 +02:00
|
|
|
makeFlags = [
|
2020-09-23 13:10:12 +02:00
|
|
|
"-f" "Makefile.${cc.cc.CC}"
|
2020-07-02 15:54:41 +02:00
|
|
|
"apps"
|
2020-09-21 17:30:24 +02:00
|
|
|
"APP=ExHeat3D"
|
|
|
|
( if (numComm != null) then "NUM_COMM=${toString numComm}" else "" )
|
2020-10-07 11:38:02 +02:00
|
|
|
( if (vectFlags != null) then "VECT_FLAGS=${toString vectFlags}" else "" )
|
2020-07-02 15:54:41 +02:00
|
|
|
];
|
|
|
|
|
2020-06-30 12:19:36 +02:00
|
|
|
installPhase = ''
|
2020-07-02 14:47:10 +02:00
|
|
|
mkdir -p $out/lib
|
2020-06-30 12:19:36 +02:00
|
|
|
mkdir -p $out/bin
|
2020-07-02 14:47:10 +02:00
|
|
|
cp obj/libsaiphv2.so $out/lib/
|
2020-09-21 17:30:24 +02:00
|
|
|
cp bin/ExHeat3D $out/bin/
|
2020-06-30 12:19:36 +02:00
|
|
|
'';
|
|
|
|
}
|