New stdexp resource specification
Now the options cpusPerTask ntasksPerNode nodes and jobName are required for the sbatch stage. Also cpuBind has been removed and is always set to "cores,verbose" in the srun stage.
This commit is contained in:
parent
dabc6be640
commit
b4a3bb0ede
@ -46,14 +46,15 @@ rec {
|
|||||||
inherit (config.garlic.sbatch) reservation;
|
inherit (config.garlic.sbatch) reservation;
|
||||||
} //
|
} //
|
||||||
# However, if the experiment contains a reservation, that takes priority
|
# However, if the experiment contains a reservation, that takes priority
|
||||||
# over the one set in the ~/.config/nixpkgs/config.nix file
|
# over the one set in the ~/.config/nixpkgs/config.nix file. Add other
|
||||||
optionalAttrs (conf ? reservation) {
|
# options if they are defined as well.
|
||||||
inherit (conf) reservation;
|
optionalInherit [ "reservation" "time" "qos" ] conf //
|
||||||
} //
|
|
||||||
# Finally, add all the other required parameters
|
# Finally, add all the other required parameters
|
||||||
{
|
{
|
||||||
|
inherit nextStage nixPrefix;
|
||||||
|
# These sbatch options are mandatory
|
||||||
|
inherit cpusPerTask ntasksPerNode nodes jobName;
|
||||||
exclusive = true;
|
exclusive = true;
|
||||||
inherit nextStage nixPrefix nodes ntasksPerNode time qos jobName;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -62,10 +63,17 @@ rec {
|
|||||||
inherit nextStage;
|
inherit nextStage;
|
||||||
};
|
};
|
||||||
|
|
||||||
srun = {nextStage, conf, ...}: stages.srun {
|
srun = {nextStage, conf, ...}: (
|
||||||
inherit (conf) nixPrefix cpuBind;
|
assert (assertMsg (!(conf ? cpuBind))
|
||||||
inherit nextStage;
|
"cpuBind is no longer available in the standard srun stage");
|
||||||
};
|
stages.srun {
|
||||||
|
inherit (conf) nixPrefix;
|
||||||
|
inherit nextStage;
|
||||||
|
|
||||||
|
# Binding is set to cores always
|
||||||
|
cpuBind = "cores,verbose";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
isolate = {nextStage, conf, ...}: stages.isolate {
|
isolate = {nextStage, conf, ...}: stages.isolate {
|
||||||
clusterName = machineConf.name;
|
clusterName = machineConf.name;
|
||||||
|
Loading…
Reference in New Issue
Block a user