bscpkgs/garlic/apps/hpccg/default.nix

55 lines
1.0 KiB
Nix
Raw Normal View History

2020-07-20 12:04:15 +02:00
{
stdenv
, icc
2021-04-20 18:02:53 +02:00
, mpi ? null
, tampi ? null
, mcxx ? null
, gitBranch ? "garlic/mpi+isend+seq"
, gitCommit ? null
, garlicTools
2020-07-20 12:04:15 +02:00
}:
2021-04-20 18:02:53 +02:00
assert !(tampi != null && mcxx == null);
with stdenv.lib;
let
gitSource = garlicTools.fetchGarlicApp {
appName = "hpccg";
inherit gitCommit gitBranch;
gitTable = import ./git-table.nix;
};
in
2021-04-20 18:09:24 +02:00
stdenv.mkDerivation rec {
name = "hpccg";
2020-07-20 12:04:15 +02:00
2021-04-20 18:09:24 +02:00
inherit (gitSource) src gitBranch gitCommit;
2021-04-20 18:02:53 +02:00
2021-04-20 18:09:24 +02:00
programPath = "/bin/test_HPCCG-mpi.exe";
2020-07-20 12:04:15 +02:00
2021-04-20 18:09:24 +02:00
buildInputs = [
icc
]
++ optional (mpi != null) mpi
++ optional (tampi != null) tampi
++ optional (mcxx != null) mcxx;
2020-07-20 12:04:15 +02:00
2021-04-20 18:09:24 +02:00
# The hpccg app fails to compile in parallel. Makefile must be fixed before.
enableParallelBuilding = false;
2020-07-20 12:04:15 +02:00
2021-04-20 18:09:24 +02:00
makeFlags = [
"USE_MPI=-DUSING_MPI"
]
++ optional (tampi != null) "TAMPI_HOME=${tampi}";
2021-04-20 18:02:53 +02:00
2021-04-20 18:09:24 +02:00
dontPatchShebangs = true;
2020-07-20 12:04:15 +02:00
2021-04-20 18:09:24 +02:00
installPhase = ''
echo ${tampi}
mkdir -p $out/bin
cp test_HPCCG-mpi.exe $out/bin
'';
2021-04-20 18:02:53 +02:00
hardeningDisable = [ "all" ];
2021-04-20 18:09:24 +02:00
}