saiph: add gitTable
This commit is contained in:
parent
9377adf787
commit
1402111e40
@ -26,6 +26,7 @@
|
||||
, sizex ? 3
|
||||
, sizey ? 4
|
||||
, sizez ? 4
|
||||
, garlicTools
|
||||
}:
|
||||
|
||||
assert enableManualDist -> (nbgx != null);
|
||||
@ -35,70 +36,71 @@ assert enableManualDist -> (nbgz != null);
|
||||
with stdenv.lib;
|
||||
with stdenv.lib.versions;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "saiph";
|
||||
let
|
||||
gitSource = garlicTools.fetchGarlicApp {
|
||||
appName = "saiph";
|
||||
inherit gitCommit gitBranch;
|
||||
gitTable = import ./git-table.nix;
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "saiph";
|
||||
|
||||
inherit gitBranch gitCommit;
|
||||
src = builtins.fetchGit ({
|
||||
url = "ssh://git@bscpm03.bsc.es/DSLs/saiph.git";
|
||||
ref = "${gitBranch}";
|
||||
} // (optionalAttrs (gitCommit != null) {
|
||||
rev = "${gitCommit}";
|
||||
}));
|
||||
inherit (gitSource) src gitBranch gitCommit;
|
||||
|
||||
programPath = "/bin/Heat3D_vect";
|
||||
programPath = "/bin/Heat3D_vect";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
dontStrip = true;
|
||||
enableDebugging = true;
|
||||
enableParallelBuilding = true;
|
||||
dontStrip = true;
|
||||
enableDebugging = true;
|
||||
|
||||
buildInputs = [
|
||||
nanos6
|
||||
mpi
|
||||
tampi
|
||||
cc
|
||||
vtk
|
||||
boost
|
||||
];
|
||||
buildInputs = [
|
||||
nanos6
|
||||
mpi
|
||||
tampi
|
||||
cc
|
||||
vtk
|
||||
boost
|
||||
];
|
||||
|
||||
# Required for nanos6
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
preBuild = ''
|
||||
cd saiphv2/cpp/src
|
||||
export VTK_VERSION=${majorMinor (getVersion vtk.name)}
|
||||
export VTK_HOME=${vtk}
|
||||
make clean
|
||||
|
||||
sed -i '/SIZEX =/s/3/${toString sizex}/g' testApp/Heat3D_vect.cpp
|
||||
sed -i '/SIZEY =/s/4/${toString sizey}/g' testApp/Heat3D_vect.cpp
|
||||
sed -i '/SIZEZ =/s/4/${toString sizez}/g' testApp/Heat3D_vect.cpp
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"-f" "Makefile.${cc.CC}"
|
||||
"apps"
|
||||
"APP=Heat3D_vect"
|
||||
] ++ optional (cachelineBytes != null) "ROW_ALIGNMENT=${toString cachelineBytes}"
|
||||
++ optional (L3SizeKB != null) "L3_SIZE_K=${toString L3SizeKB}"
|
||||
++ optional (enableManualDist) "DIST_SET=1"
|
||||
++ optional (enableManualDist) "NBG_X=${toString nbgx}"
|
||||
++ optional (enableManualDist) "NBG_Y=${toString nbgy}"
|
||||
++ optional (enableManualDist) "NBG_Z=${toString nbgz}"
|
||||
++ optional (nblx != null) "NBL_X=${toString nblx}"
|
||||
++ optional (nbly != null) "NBL_Y=${toString nbly}"
|
||||
++ optional (nblz != null) "NBL_Z=${toString nblz}"
|
||||
++ optional (nsteps != null) "NSTEPS=${toString nsteps}"
|
||||
++ optional (numComm != null) "NUM_COMM=${toString numComm}"
|
||||
++ optional (enableVectFlags) "VECT_CHECKS=1"
|
||||
++ optional (enableDebugFlags) "DEBUG_CHECKS=1"
|
||||
++ optional (enableAsanFlags) "SANITIZE_CHECKS=1"
|
||||
;
|
||||
# Required for nanos6
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
mkdir -p $out/bin
|
||||
cp obj/libsaiphv2.so $out/lib/
|
||||
cp bin/Heat3D_vect $out/bin/
|
||||
'';
|
||||
}
|
||||
preBuild = ''
|
||||
cd saiphv2/cpp/src
|
||||
export VTK_VERSION=${majorMinor (getVersion vtk.name)}
|
||||
export VTK_HOME=${vtk}
|
||||
make clean
|
||||
|
||||
sed -i '/SIZEX =/s/3/${toString sizex}/g' testApp/Heat3D_vect.cpp
|
||||
sed -i '/SIZEY =/s/4/${toString sizey}/g' testApp/Heat3D_vect.cpp
|
||||
sed -i '/SIZEZ =/s/4/${toString sizez}/g' testApp/Heat3D_vect.cpp
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"-f" "Makefile.${cc.CC}"
|
||||
"apps"
|
||||
"APP=Heat3D_vect"
|
||||
] ++ optional (cachelineBytes != null) "ROW_ALIGNMENT=${toString cachelineBytes}"
|
||||
++ optional (L3SizeKB != null) "L3_SIZE_K=${toString L3SizeKB}"
|
||||
++ optional (enableManualDist) "DIST_SET=1"
|
||||
++ optional (enableManualDist) "NBG_X=${toString nbgx}"
|
||||
++ optional (enableManualDist) "NBG_Y=${toString nbgy}"
|
||||
++ optional (enableManualDist) "NBG_Z=${toString nbgz}"
|
||||
++ optional (nblx != null) "NBL_X=${toString nblx}"
|
||||
++ optional (nbly != null) "NBL_Y=${toString nbly}"
|
||||
++ optional (nblz != null) "NBL_Z=${toString nblz}"
|
||||
++ optional (nsteps != null) "NSTEPS=${toString nsteps}"
|
||||
++ optional (numComm != null) "NUM_COMM=${toString numComm}"
|
||||
++ optional (enableVectFlags) "VECT_CHECKS=1"
|
||||
++ optional (enableDebugFlags) "DEBUG_CHECKS=1"
|
||||
++ optional (enableAsanFlags) "SANITIZE_CHECKS=1"
|
||||
;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
mkdir -p $out/bin
|
||||
cp obj/libsaiphv2.so $out/lib/
|
||||
cp bin/Heat3D_vect $out/bin/
|
||||
'';
|
||||
}
|
||||
|
10
garlic/apps/saiph/git-table.nix
Normal file
10
garlic/apps/saiph/git-table.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
# Auto-generated with garlic-git-table on 2021-04-19 for repo:
|
||||
# ssh://git@bscpm03.bsc.es/garlic/apps/saiph.git
|
||||
|
||||
"garlic/mpi+isend+omp+fork+simd" = "96823846b327b6860f05d428f0cd5ed8ca537a0e";
|
||||
"garlic/mpi+isend+omp+task+simd" = "de0346a559120f561bff554aa86b34d01214b714";
|
||||
"garlic/mpi+isend+seq+simd" = "1411dad765231f5d3cec9f621526583974232d42";
|
||||
"garlic/tampi+isend+omp+task+simd" = "587a7651df8eb69cae4a79bdfc5cb7f50723f3ce";
|
||||
"garlic/tampi+isend+oss+task+simd" = "3731197d3e35df248fa6bdb7e4cb05c5dd4f2597";
|
||||
}
|
Loading…
Reference in New Issue
Block a user