bscpkgs/garlic/apps/lulesh/default.nix

41 lines
751 B
Nix
Raw Normal View History

2020-07-13 14:09:20 +02:00
{
stdenv
2021-01-28 14:57:51 +01:00
, impi
2020-07-13 14:09:20 +02:00
, mcxx
, icc
2021-01-28 14:57:51 +01:00
, gitBranch ? "garlic/tampi+isend+oss+taskfor"
, tampi ? null
2020-07-13 14:09:20 +02:00
}:
2021-01-28 14:57:51 +01:00
with stdenv.lib;
2020-07-13 14:09:20 +02:00
stdenv.mkDerivation rec {
name = "lulesh";
src = builtins.fetchGit {
2021-01-28 14:57:51 +01:00
url = "ssh://git@bscpm03.bsc.es/garlic/apps/lulesh.git";
ref = gitBranch;
2020-07-13 14:09:20 +02:00
};
dontConfigure = true;
2021-01-28 14:57:51 +01:00
preBuild = optionalString (tampi != null) "export TAMPI_HOME=${tampi}";
#TODO: Allow multiple MPI implementations and compilers
2020-07-13 14:09:20 +02:00
buildInputs = [
2021-01-28 14:57:51 +01:00
impi
2020-07-13 14:09:20 +02:00
icc
mcxx
];
enableParallelBuilding = true;
2021-01-28 14:57:51 +01:00
#TODO: Can we build an executable named "lulesh" in all branches?
2020-07-13 14:09:20 +02:00
installPhase = ''
mkdir -p $out/bin
2021-01-28 14:57:51 +01:00
find . -name 'lulesh*' -type f -executable -exec cp \{\} $out/bin/${name} \;
2020-07-13 14:09:20 +02:00
'';
2021-01-28 14:57:51 +01:00
programPath = "/bin/${name}";
2020-07-13 14:09:20 +02:00
}