Less verbose execution

This commit is contained in:
Rodrigo Arias 2020-10-14 16:29:22 +02:00
parent 9d8f7d9074
commit 80ccd1240a
6 changed files with 11 additions and 14 deletions

View File

@ -26,9 +26,6 @@ stdenv.mkDerivation {
desc = "# $out\n" + (if builtins.hasAttr "desc" nextStage then nextStage.desc else "");
out = "$out";
installPhase = ''
echo PATH=$PATH
substituteAllInPlace stage1
substituteAllInPlace stage2

View File

@ -1,7 +1,7 @@
#!/bin/bash -ex
#!/bin/bash -e
>&2 echo Running isolate stage1
>&2 echo PATH=$PATH
#>&2 echo Running isolate stage1
#>&2 echo PATH=$PATH
if [ -e /nix ]; then
>&2 echo "/nix found, aborting"
@ -42,5 +42,5 @@ mounts=(
join_flags="${mounts[@]}"
exec $nixjoin -v -i $join_flags $nixhome -- \
exec $nixjoin -i $join_flags $nixhome -- \
env -i "${env[@]}" @out@/bin/stage2

View File

@ -1,7 +1,7 @@
#!/bin/sh -ex
#!/bin/sh -e
>&2 echo Running isolate stage2
>&2 echo PATH=$PATH
#>&2 echo Running isolate stage2
#>&2 echo PATH=$PATH
if [ ! -e /nix ]; then
>&2 echo "/nix not found, aborting"

View File

@ -1,4 +1,4 @@
#!/bin/sh -ex
#!/bin/sh -e
if [ -e /nix ]; then
>&2 echo "Cannot use runexp inside nix environment!"

View File

@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out
cat > $out/job <<EOF
#!/bin/sh -ex
#!/bin/sh -e
#SBATCH --job-name="${jobName}"
''
+ sbatchOpt "ntasks" ntasks
@ -76,7 +76,7 @@ stdenv.mkDerivation rec {
EOF
cat > $out/run <<EOF
#!/bin/sh -ex
#!/bin/sh -e
${slurm}/bin/sbatch ${nixPrefix}$out/job
EOF
chmod +x $out/run

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
dontPatchShebangs = true;
installPhase = ''
cat > $out <<EOF
#!/bin/sh -ex
#!/bin/sh -e
exec ${slurm}/bin/srun \
--mpi=pmi2 \
--cpu-bind=${cpuBind} \