Success sbatch launch in MN4 with nbody seq
This commit is contained in:
parent
9631f4c223
commit
b9e9409a59
@ -65,7 +65,13 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
nbodyBSjob = callPackage ./dispatcher.nix {
|
nbodyBSjob = callPackage ./dispatcher.nix {
|
||||||
jobs = map (app: srunner {app=app;}) (
|
jobs = map (app: srunner {
|
||||||
|
app=app;
|
||||||
|
prefix="/gpfs/projects/bsc15/nix";
|
||||||
|
exclusive=false;
|
||||||
|
ntasks = "1";
|
||||||
|
}
|
||||||
|
) (
|
||||||
genApp nbody (
|
genApp nbody (
|
||||||
genConfigs {
|
genConfigs {
|
||||||
cc = [ bsc.icc ];
|
cc = [ bsc.icc ];
|
||||||
|
@ -19,7 +19,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cat > $out/bin/execute-all-jobs <<EOF
|
cat > $out/bin/execute-all-jobs <<EOF
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
for j in $out/jobs/*; do
|
for j in $out/jobs/*; do
|
||||||
echo "sbatch \$j"
|
echo "sbatch \$j"
|
||||||
|
@ -29,12 +29,25 @@ stdenv.mkDerivation {
|
|||||||
"BS=${toString blocksize}"
|
"BS=${toString blocksize}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
dontPatchShebangs = true;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp nbody $out/bin/
|
cp nbody $out/bin/
|
||||||
|
|
||||||
cat > $out/bin/run <<EOF
|
cat > $out/bin/run <<EOF
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
|
# We need to enter the nix namespace first, in order to have /nix
|
||||||
|
# available, so we use this hack:
|
||||||
|
if [ ! -e /nix ]; then
|
||||||
|
echo "running nix-setup \$0"
|
||||||
|
exec nix-setup \$0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ls -l /nix
|
||||||
|
pwd
|
||||||
|
|
||||||
exec $out/bin/nbody -p ${toString particles} -t ${toString timesteps}
|
exec $out/bin/nbody -p ${toString particles} -t ${toString timesteps}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
app
|
app
|
||||||
|
, prefix ? ""
|
||||||
, argv ? ""
|
, argv ? ""
|
||||||
, binary ? "/bin/run"
|
, binary ? "/bin/run"
|
||||||
, ntasks ? null
|
, ntasks ? null
|
||||||
@ -55,11 +56,9 @@ stdenv.mkDerivation rec {
|
|||||||
+ sbatchOpt "time" time
|
+ sbatchOpt "time" time
|
||||||
+ sbatchOpt "qos" qos
|
+ sbatchOpt "qos" qos
|
||||||
+ optionalString (extra!=null) extra
|
+ optionalString (extra!=null) extra
|
||||||
+''
|
+
|
||||||
|
''
|
||||||
${numactl}/bin/numactl -s
|
srun ${prefix}${app}${binary} ${argv}
|
||||||
|
|
||||||
srun ${app}${binary} ${argv}
|
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user