Add srun wrapper and use pmi2

This commit is contained in:
2020-08-17 18:50:18 +02:00
parent df18435dfc
commit 01295487d8
7 changed files with 138 additions and 18 deletions

View File

@@ -1,22 +1,26 @@
{
stdenv
, cc
, mpi ? null
, cflags ? null
, gitBranch
, gitURL ? "ssh://git@bscpm02.bsc.es/rarias/nbody.git"
, blocksize ? 2048
}:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "nbody";
src = builtins.fetchGit {
url = "ssh://git@bscpm02.bsc.es/rarias/nbody.git";
url = "${gitURL}";
ref = "${gitBranch}";
};
buildInputs = [
cc
];
]
++ optional (mpi != null) [ mpi ];
preBuild = (if cflags != null then ''
makeFlagsArray+=(CFLAGS="${cflags}")