forked from rarias/bscpkgs
Add srun wrapper and use pmi2
This commit is contained in:
20
bsc/garlic/srun.nix
Normal file
20
bsc/garlic/srun.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
stdenv
|
||||
}:
|
||||
{ app , nixPrefix ? "" }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${app.name}-srun";
|
||||
preferLocalBuild = true;
|
||||
phases = [ "installPhase" ];
|
||||
buildInputs = [ app ];
|
||||
dontPatchShebangs = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cat > $out/bin/run <<EOF
|
||||
#!/bin/sh
|
||||
exec srun --mpi=pmi2 ${nixPrefix}${app}/bin/run
|
||||
EOF
|
||||
chmod +x $out/bin/run
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user