2020-07-10 16:49:39 +02:00
|
|
|
{
|
|
|
|
stdenv
|
|
|
|
, nanos6
|
|
|
|
, mpi
|
2020-09-30 17:32:49 +02:00
|
|
|
, openmpi
|
|
|
|
, impi
|
2020-07-10 16:49:39 +02:00
|
|
|
, tampi
|
|
|
|
, mcxx
|
2020-10-01 16:48:35 +02:00
|
|
|
, gnuDef
|
|
|
|
, intelDef
|
2020-09-30 17:32:49 +02:00
|
|
|
, cc
|
|
|
|
, gitBranch
|
2020-07-10 16:49:39 +02:00
|
|
|
}:
|
|
|
|
|
2020-09-30 17:32:49 +02:00
|
|
|
assert (mpi == impi || mpi == openmpi);
|
|
|
|
|
|
|
|
let
|
|
|
|
mpiName = (if mpi == openmpi then
|
|
|
|
"OpenMPI"
|
|
|
|
else
|
|
|
|
"IntelMPI");
|
|
|
|
|
2020-10-01 16:48:35 +02:00
|
|
|
compName = (if cc == intelDef then
|
|
|
|
"Intel"
|
|
|
|
else
|
|
|
|
"GNU");
|
|
|
|
|
2020-09-30 17:32:49 +02:00
|
|
|
in
|
2020-07-10 16:49:39 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "creams";
|
|
|
|
|
2020-09-30 17:32:49 +02:00
|
|
|
# src = /home/Computational/pmartin1/creams-simplified;
|
2020-07-10 16:49:39 +02:00
|
|
|
src = builtins.fetchGit {
|
|
|
|
url = "ssh://git@bscpm02.bsc.es/pmartin1/creams-simplified.git";
|
2020-09-30 17:32:49 +02:00
|
|
|
ref = "${gitBranch}";
|
2020-07-10 16:49:39 +02:00
|
|
|
};
|
|
|
|
|
2020-09-30 17:32:49 +02:00
|
|
|
programPath = "/bin/creams.exe";
|
|
|
|
|
2020-07-10 16:49:39 +02:00
|
|
|
buildInputs = [
|
|
|
|
nanos6
|
|
|
|
mpi
|
2020-09-30 17:32:49 +02:00
|
|
|
cc
|
2020-07-10 16:49:39 +02:00
|
|
|
tampi
|
|
|
|
mcxx
|
|
|
|
];
|
|
|
|
|
|
|
|
hardeningDisable = [ "all" ];
|
|
|
|
|
2020-07-10 17:02:33 +02:00
|
|
|
configurePhase = ''
|
2020-07-10 16:49:39 +02:00
|
|
|
export TAMPI_HOME=${tampi}
|
2020-09-30 17:32:49 +02:00
|
|
|
|
2020-07-10 16:49:39 +02:00
|
|
|
. etc/bashrc
|
2020-10-01 16:48:35 +02:00
|
|
|
|
|
|
|
export FORTRAN_COMPILER=${compName}
|
2020-09-30 17:32:49 +02:00
|
|
|
export MPI_LIB=${mpiName}
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
CREAMS_UPDATE_ENVIRONMENT
|
2020-07-10 16:49:39 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -a build/* $out/bin
|
|
|
|
'';
|
|
|
|
}
|