bscpkgs/garlic/apps/lulesh/default.nix

47 lines
895 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
, tampi ? null
2021-04-20 18:42:19 +02:00
, gitBranch ? "garlic/mpi+isend+seq"
, gitCommit ? null
, garlicTools
2020-07-13 14:09:20 +02:00
}:
2021-01-28 14:57:51 +01:00
with stdenv.lib;
2021-04-20 18:42:19 +02:00
let
gitSource = garlicTools.fetchGarlicApp {
appName = "lulesh";
inherit gitCommit gitBranch;
gitTable = import ./git-table.nix;
2020-07-13 14:09:20 +02:00
};
2021-04-20 18:42:19 +02:00
in
stdenv.mkDerivation rec {
name = "lulesh";
inherit (gitSource) src gitBranch gitCommit;
2020-07-13 14:09:20 +02:00
2021-04-20 18:42:19 +02:00
dontConfigure = true;
2020-07-13 14:09:20 +02:00
2021-04-20 18:42:19 +02:00
preBuild = optionalString (tampi != null) "export TAMPI_HOME=${tampi}";
2021-01-28 14:57:51 +01:00
2021-04-20 18:42:19 +02:00
#TODO: Allow multiple MPI implementations and compilers
buildInputs = [
impi
icc
mcxx
];
2020-07-13 14:09:20 +02:00
2021-04-20 18:42:19 +02:00
enableParallelBuilding = true;
2020-07-13 14:09:20 +02:00
2021-04-20 18:42:19 +02:00
#TODO: Can we build an executable named "lulesh" in all branches?
installPhase = ''
mkdir -p $out/bin
find . -name 'lulesh*' -type f -executable -exec cp \{\} $out/bin/${name} \;
'';
programPath = "/bin/${name}";
2020-07-13 14:09:20 +02:00
2021-04-20 18:42:19 +02:00
}