aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2018-10-22 11:47:38 +1100
committerJustin Bedo <cu@cua0.org>2018-10-22 11:47:38 +1100
commitc768093d0e8990657a42b1668c5f86048cbc6675 (patch)
tree40e8e287d00c4e9b0fb3501b65a84cf1abaf852c /lib
parent9e15e281e415c3fdb22953fcb138a2595742d7f6 (diff)
name qsub with name of derivation: fixes #7
Diffstat (limited to 'lib')
-rw-r--r--lib/qsub.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/qsub.nix b/lib/qsub.nix
index 528773e..f0b0660 100644
--- a/lib/qsub.nix
+++ b/lib/qsub.nix
@@ -1,6 +1,6 @@
{stdenv, lib, writeScript}:
-{ ppn ? 1, mem ? 1, walltime ? "24:00:00", tmpDir ? "/tmp" }: drv: lib.overrideDerivation drv ({ args, builder, ... }: {
+{ ppn ? 1, mem ? 1, walltime ? "24:00:00", tmpDir ? "/tmp" }: drv: lib.overrideDerivation drv ({ args, builder, name, ... }: {
builder = "/bin/bash";
args = let
script = writeScript "qsub-script" ''
@@ -25,7 +25,7 @@
PATH=/usr/bin:/bin:/usr/sbin:/sbin
SHELL=/bin/sh
NIX_BUILD_CORES=${toString ppn}
- id=$(qsub -l nodes=1:ppn=${toString ppn},mem=${toString mem}gb,walltime=${walltime} ${script})
+ id=$(qsub -l nodes=1:ppn=${toString ppn},mem=${toString mem}gb,walltime=${walltime} -N "${name}" ${script})
function cleanup {
qstat ''${id%%.} 2> /dev/null > /dev/null && qdel $id || true