2020-06-30 12:19:36 +02:00
|
|
|
{
|
|
|
|
stdenv
|
|
|
|
, nanos6
|
|
|
|
, mpi
|
|
|
|
, tampi
|
|
|
|
, mcxx
|
|
|
|
, vtk
|
|
|
|
, boost
|
|
|
|
}:
|
|
|
|
|
|
|
|
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";
|
|
|
|
ref = "VectorisationSupport";
|
|
|
|
};
|
2020-06-30 12:19:36 +02:00
|
|
|
|
2020-07-03 11:13:41 +02:00
|
|
|
#src = /tmp/saiph;
|
2020-06-30 12:19:36 +02:00
|
|
|
|
2020-07-02 14:47:10 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
dontStrip = true;
|
2020-07-03 11:13:41 +02:00
|
|
|
enableDebugging = true;
|
2020-06-30 12:19:36 +02:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
nanos6
|
|
|
|
mpi
|
|
|
|
tampi
|
|
|
|
mcxx
|
|
|
|
vtk
|
|
|
|
boost
|
|
|
|
];
|
|
|
|
|
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
|
|
|
|
|
|
|
sed -i s/skylake-avx512/core-avx2/g Makefile*
|
2020-07-02 14:47:10 +02:00
|
|
|
export VTK_VERSION=8.2
|
|
|
|
export VTK_HOME=${vtk}
|
|
|
|
export SAIPH_HOME=.
|
2020-07-03 11:13:41 +02:00
|
|
|
export NIX_CFLAGS_COMPILE+=" -fsanitize=address"
|
2020-06-30 12:19:36 +02:00
|
|
|
'';
|
|
|
|
|
2020-07-02 15:54:41 +02:00
|
|
|
makeFlags = [
|
|
|
|
"-f" "Makefile.clang"
|
|
|
|
"apps"
|
|
|
|
"APP=ExHeat"
|
|
|
|
];
|
|
|
|
|
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/
|
|
|
|
cp bin/ExHeat $out/bin/
|
2020-06-30 12:19:36 +02:00
|
|
|
'';
|
|
|
|
}
|