From 0f62151dcf0e75d9a40d7ed29aa7561bda45f12b Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Thu, 28 Jan 2021 14:57:51 +0100 Subject: [PATCH] lulesh: follow garlic git branches --- garlic/apps/lulesh/default.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/garlic/apps/lulesh/default.nix b/garlic/apps/lulesh/default.nix index d677161..3659caf 100644 --- a/garlic/apps/lulesh/default.nix +++ b/garlic/apps/lulesh/default.nix @@ -1,31 +1,40 @@ { stdenv -, mpi +, impi , mcxx , icc +, gitBranch ? "garlic/tampi+isend+oss+taskfor" +, tampi ? null }: +with stdenv.lib; + stdenv.mkDerivation rec { name = "lulesh"; src = builtins.fetchGit { - url = "ssh://git@bscpm03.bsc.es/mmaronas/lulesh.git"; - ref = "master"; + url = "ssh://git@bscpm03.bsc.es/garlic/apps/lulesh.git"; + ref = gitBranch; }; dontConfigure = true; + preBuild = optionalString (tampi != null) "export TAMPI_HOME=${tampi}"; + + #TODO: Allow multiple MPI implementations and compilers buildInputs = [ - mpi + impi icc mcxx ]; enableParallelBuilding = true; + #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/ \; + find . -name 'lulesh*' -type f -executable -exec cp \{\} $out/bin/${name} \; ''; + programPath = "/bin/${name}"; }