2020-12-03 16:57:13 +01:00
|
|
|
{
|
|
|
|
stdenv
|
2022-09-01 16:27:29 +02:00
|
|
|
, lib
|
2020-12-03 16:57:13 +01:00
|
|
|
, tampi
|
|
|
|
, clangOmpss2
|
|
|
|
, mpi
|
|
|
|
, nanos6
|
|
|
|
, mcxx
|
|
|
|
, variant
|
|
|
|
}:
|
|
|
|
|
2022-09-01 16:27:29 +02:00
|
|
|
with lib;
|
2020-12-03 16:57:13 +01:00
|
|
|
|
|
|
|
assert (assertOneOf "variant" variant [ "openmp" "openmp-tasks" "ompss-2" ]);
|
|
|
|
|
|
|
|
let
|
|
|
|
cc=mcxx;
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "miniamr";
|
|
|
|
|
|
|
|
src = builtins.fetchGit {
|
2020-12-07 13:47:17 +01:00
|
|
|
url = "ssh://git@bscpm03.bsc.es/ksala/miniamr.git";
|
2020-12-03 16:57:13 +01:00
|
|
|
ref = "master";
|
|
|
|
};
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
sourceRoot=$sourceRoot/${variant}
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ tampi clangOmpss2 mpi nanos6 mcxx ];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"CC=${cc.CC}"
|
|
|
|
"CXX=${cc.CXX}"
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp miniAMR.x $out/bin/
|
|
|
|
'';
|
|
|
|
|
|
|
|
programPath = "/bin/miniAMR.x";
|
|
|
|
|
2021-04-06 19:19:24 +02:00
|
|
|
hardeningDisable = [ "all" ];
|
2020-12-03 16:57:13 +01:00
|
|
|
}
|