sbatch: Use experiment reservation if given

This commit is contained in:
Rodrigo Arias 2020-11-13 10:17:54 +01:00
parent 5333058741
commit 42f2227a9f

View File

@ -43,7 +43,14 @@ rec {
# experiment, if the reservation is set like with nodes or ntasksPerNode. # experiment, if the reservation is set like with nodes or ntasksPerNode.
optionalAttrs (config ? garlic.sbatch.reservation) { optionalAttrs (config ? garlic.sbatch.reservation) {
inherit (config.garlic.sbatch) reservation; inherit (config.garlic.sbatch) reservation;
} // { } //
# However, if the experiment contains a reservation, that takes priority
# over the one set in the ~/.config/nixpkgs/config.nix file
optionalAttrs (conf ? reservation) {
inherit (conf) reservation;
} //
# Finally, add all the other required parameters
{
exclusive = true; exclusive = true;
inherit nextStage nixPrefix nodes ntasksPerNode time qos jobName; inherit nextStage nixPrefix nodes ntasksPerNode time qos jobName;
} }