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
|
2020-07-20 12:04:15 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "hpccg";
|
|
|
|
|
2021-04-20 18:02:53 +02:00
|
|
|
inherit (gitSource) src gitBranch gitCommit;
|
|
|
|
|
|
|
|
programPath = "/bin/test_HPCCG-mpi.exe";
|
2020-07-20 12:04:15 +02:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
icc
|
2021-04-20 18:02:53 +02:00
|
|
|
]
|
|
|
|
++ optional (mpi != null) mpi
|
|
|
|
++ optional (tampi != null) tampi
|
|
|
|
++ optional (mcxx != null) mcxx;
|
2020-07-20 12:04:15 +02:00
|
|
|
|
|
|
|
# The hpccg app fails to compile in parallel. Makefile must be fixed before.
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
2021-04-20 18:02:53 +02:00
|
|
|
makeFlags = [
|
2020-07-20 12:04:15 +02:00
|
|
|
"USE_MPI=-DUSING_MPI"
|
2021-04-20 18:02:53 +02:00
|
|
|
]
|
|
|
|
++ optional (tampi != null) "TAMPI_HOME=${tampi}";
|
|
|
|
|
|
|
|
dontPatchShebangs = true;
|
2020-07-20 12:04:15 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-04-20 18:02:53 +02:00
|
|
|
echo ${tampi}
|
2020-07-20 12:04:15 +02:00
|
|
|
mkdir -p $out/bin
|
2021-04-20 18:02:53 +02:00
|
|
|
cp test_HPCCG-mpi.exe $out/bin
|
2020-07-20 12:04:15 +02:00
|
|
|
'';
|
2021-04-20 18:02:53 +02:00
|
|
|
|
2020-07-20 12:04:15 +02:00
|
|
|
}
|