Less verbose execution
This commit is contained in:
parent
9d8f7d9074
commit
80ccd1240a
@ -26,9 +26,6 @@ stdenv.mkDerivation {
|
|||||||
desc = "# $out\n" + (if builtins.hasAttr "desc" nextStage then nextStage.desc else "");
|
desc = "# $out\n" + (if builtins.hasAttr "desc" nextStage then nextStage.desc else "");
|
||||||
out = "$out";
|
out = "$out";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
|
||||||
echo PATH=$PATH
|
|
||||||
|
|
||||||
substituteAllInPlace stage1
|
substituteAllInPlace stage1
|
||||||
substituteAllInPlace stage2
|
substituteAllInPlace stage2
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash -ex
|
#!/bin/bash -e
|
||||||
|
|
||||||
>&2 echo Running isolate stage1
|
#>&2 echo Running isolate stage1
|
||||||
>&2 echo PATH=$PATH
|
#>&2 echo PATH=$PATH
|
||||||
|
|
||||||
if [ -e /nix ]; then
|
if [ -e /nix ]; then
|
||||||
>&2 echo "/nix found, aborting"
|
>&2 echo "/nix found, aborting"
|
||||||
@ -42,5 +42,5 @@ mounts=(
|
|||||||
|
|
||||||
join_flags="${mounts[@]}"
|
join_flags="${mounts[@]}"
|
||||||
|
|
||||||
exec $nixjoin -v -i $join_flags $nixhome -- \
|
exec $nixjoin -i $join_flags $nixhome -- \
|
||||||
env -i "${env[@]}" @out@/bin/stage2
|
env -i "${env[@]}" @out@/bin/stage2
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh -ex
|
#!/bin/sh -e
|
||||||
|
|
||||||
>&2 echo Running isolate stage2
|
#>&2 echo Running isolate stage2
|
||||||
>&2 echo PATH=$PATH
|
#>&2 echo PATH=$PATH
|
||||||
|
|
||||||
if [ ! -e /nix ]; then
|
if [ ! -e /nix ]; then
|
||||||
>&2 echo "/nix not found, aborting"
|
>&2 echo "/nix not found, aborting"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh -ex
|
#!/bin/sh -e
|
||||||
|
|
||||||
if [ -e /nix ]; then
|
if [ -e /nix ]; then
|
||||||
>&2 echo "Cannot use runexp inside nix environment!"
|
>&2 echo "Cannot use runexp inside nix environment!"
|
||||||
|
@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cat > $out/job <<EOF
|
cat > $out/job <<EOF
|
||||||
#!/bin/sh -ex
|
#!/bin/sh -e
|
||||||
#SBATCH --job-name="${jobName}"
|
#SBATCH --job-name="${jobName}"
|
||||||
''
|
''
|
||||||
+ sbatchOpt "ntasks" ntasks
|
+ sbatchOpt "ntasks" ntasks
|
||||||
@ -76,7 +76,7 @@ stdenv.mkDerivation rec {
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat > $out/run <<EOF
|
cat > $out/run <<EOF
|
||||||
#!/bin/sh -ex
|
#!/bin/sh -e
|
||||||
${slurm}/bin/sbatch ${nixPrefix}$out/job
|
${slurm}/bin/sbatch ${nixPrefix}$out/job
|
||||||
EOF
|
EOF
|
||||||
chmod +x $out/run
|
chmod +x $out/run
|
||||||
|
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
|||||||
dontPatchShebangs = true;
|
dontPatchShebangs = true;
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
cat > $out <<EOF
|
cat > $out <<EOF
|
||||||
#!/bin/sh -ex
|
#!/bin/sh -e
|
||||||
exec ${slurm}/bin/srun \
|
exec ${slurm}/bin/srun \
|
||||||
--mpi=pmi2 \
|
--mpi=pmi2 \
|
||||||
--cpu-bind=${cpuBind} \
|
--cpu-bind=${cpuBind} \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user