forked from rarias/bscpkgs
Move apps into garlic/apps
This commit is contained in:
67
garlic/apps/creams/default.nix
Normal file
67
garlic/apps/creams/default.nix
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
stdenv
|
||||
, nanos6
|
||||
, mpi
|
||||
, openmpi
|
||||
, impi
|
||||
, tampi
|
||||
, mcxx
|
||||
, gnuDef
|
||||
, intelDef
|
||||
, cc
|
||||
, gitBranch
|
||||
}:
|
||||
|
||||
assert (mpi == impi || mpi == openmpi);
|
||||
|
||||
let
|
||||
mpiName = (if mpi == openmpi then
|
||||
"OpenMPI"
|
||||
else
|
||||
"IntelMPI");
|
||||
|
||||
compName = (if cc == intelDef then
|
||||
"Intel"
|
||||
else
|
||||
"GNU");
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "creams";
|
||||
|
||||
# src = /home/Computational/pmartin1/creams-simplified;
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@bscpm02.bsc.es/pmartin1/creams-simplified.git";
|
||||
ref = "${gitBranch}";
|
||||
};
|
||||
|
||||
programPath = "/bin/creams.exe";
|
||||
|
||||
buildInputs = [
|
||||
nanos6
|
||||
mpi
|
||||
cc
|
||||
tampi
|
||||
mcxx
|
||||
];
|
||||
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
configurePhase = ''
|
||||
export TAMPI_HOME=${tampi}
|
||||
|
||||
. etc/bashrc
|
||||
|
||||
export FORTRAN_COMPILER=${compName}
|
||||
export MPI_LIB=${mpiName}
|
||||
|
||||
echo
|
||||
|
||||
CREAMS_UPDATE_ENVIRONMENT
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -a build/* $out/bin
|
||||
'';
|
||||
}
|
||||
31
garlic/apps/creams/input.nix
Normal file
31
garlic/apps/creams/input.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
stdenv
|
||||
, granul ? 0
|
||||
, nprocz ? 0
|
||||
, gitBranch
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "creams-input";
|
||||
|
||||
# src = /home/Computational/pmartin1/creams-simplified;
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@bscpm02.bsc.es/pmartin1/creams-simplified.git";
|
||||
ref = "${gitBranch}";
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "patchPhase" "installPhase" ];
|
||||
|
||||
patchPhase = ''
|
||||
patchShebangs SodTubeBenchmark/gridScript.sh
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
pushd SodTubeBenchmark
|
||||
./gridScript.sh 0 0 ${toString nprocz} ${toString granul}
|
||||
popd
|
||||
|
||||
mkdir -p $out
|
||||
cp -a SodTubeBenchmark $out/
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user