From 147387456389e6bcefb4fc2d2d540179933f2091 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Mon, 24 Aug 2020 18:06:47 +0200 Subject: [PATCH 1/2] Use relative path in sbatch --- bsc/garlic/exp/nbody/bs.nix | 1 - bsc/garlic/sbatch.nix | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/bsc/garlic/exp/nbody/bs.nix b/bsc/garlic/exp/nbody/bs.nix index 979b925..0b41d34 100644 --- a/bsc/garlic/exp/nbody/bs.nix +++ b/bsc/garlic/exp/nbody/bs.nix @@ -37,7 +37,6 @@ let nixPrefix = "/gpfs/projects/bsc15/nix"; exclusive = false; ntasks = "${toString conf.ntasks}"; - chdirPrefix = "/home/bsc15/bsc15557/bsc-nixpkgs/out"; }; srun = app: srunWrapper { diff --git a/bsc/garlic/sbatch.nix b/bsc/garlic/sbatch.nix index 13092ba..dfdc313 100644 --- a/bsc/garlic/sbatch.nix +++ b/bsc/garlic/sbatch.nix @@ -5,7 +5,7 @@ { app -, chdirPrefix +, chdirPrefix ? "." , nixPrefix ? "" , argv ? "" , binary ? "/bin/run" From 76b0a239e3e75fc647141794da81ee5ed8ceefef Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Mon, 24 Aug 2020 18:07:09 +0200 Subject: [PATCH 2/2] sbatch: Add reservation flag --- bsc/garlic/sbatch.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bsc/garlic/sbatch.nix b/bsc/garlic/sbatch.nix index dfdc313..41bffb1 100644 --- a/bsc/garlic/sbatch.nix +++ b/bsc/garlic/sbatch.nix @@ -14,6 +14,7 @@ , nodes ? null , exclusive ? true # By default we run in exclusive mode , qos ? null +, reservation ? null , time ? null , output ? "job_%j.out" , error ? "job_%j.err" @@ -60,6 +61,7 @@ stdenv.mkDerivation rec { + sbatchEnable "exclusive" exclusive + sbatchOpt "time" time + sbatchOpt "qos" qos + + sbatchOpt "reservation" reservation + optionalString (extra!=null) extra + ''