mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-12 05:16:25 +03:00
nixos/slurm: generate mpi.conf and add config options
mpi.conf is required for PMIx configuration. Setting the PMIxCliTmpDirBase in mpi.conf per default avoids PMIx errors complaining about a missing temporary directory.
This commit is contained in:
parent
9c2023e238
commit
b1cce3b54e
1 changed files with 27 additions and 2 deletions
|
@ -32,6 +32,12 @@ let
|
||||||
${cfg.extraCgroupConfig}
|
${cfg.extraCgroupConfig}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
mpiConf = pkgs.writeTextDir "mpi.conf"
|
||||||
|
''
|
||||||
|
PMIxCliTmpDirBase=${cfg.mpi.PmixCliTmpDirBase}
|
||||||
|
${cfg.mpi.extraMpiConfig}
|
||||||
|
'';
|
||||||
|
|
||||||
slurmdbdConf = pkgs.writeText "slurmdbd.conf"
|
slurmdbdConf = pkgs.writeText "slurmdbd.conf"
|
||||||
''
|
''
|
||||||
DbdHost=${cfg.dbdserver.dbdHost}
|
DbdHost=${cfg.dbdserver.dbdHost}
|
||||||
|
@ -45,7 +51,7 @@ let
|
||||||
# in the same directory as slurm.conf
|
# in the same directory as slurm.conf
|
||||||
etcSlurm = pkgs.symlinkJoin {
|
etcSlurm = pkgs.symlinkJoin {
|
||||||
name = "etc-slurm";
|
name = "etc-slurm";
|
||||||
paths = [ configFile cgroupConfig plugStackConfig ] ++ cfg.extraConfigPaths;
|
paths = [ configFile cgroupConfig plugStackConfig mpiConf ] ++ cfg.extraConfigPaths;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
|
@ -242,6 +248,24 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mpi = {
|
||||||
|
PmixCliTmpDirBase = lib.mkOption {
|
||||||
|
default = "/tmp/pmix";
|
||||||
|
type = lib.types.str;
|
||||||
|
description = ''
|
||||||
|
Base path for PMIx temporary files.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
extraMpiConfig = lib.mkOption {
|
||||||
|
default = "";
|
||||||
|
type = lib.types.lines;
|
||||||
|
description = ''
|
||||||
|
Extra configuration for that will be added to `mpi.conf`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
extraPlugstackConfig = lib.mkOption {
|
extraPlugstackConfig = lib.mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
type = lib.types.lines;
|
type = lib.types.lines;
|
||||||
|
@ -372,8 +396,9 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.tmpfiles.rules = lib.mkIf cfg.client.enable [
|
systemd.tmpfiles.rules = lib.optionals cfg.client.enable [
|
||||||
"d /var/spool/slurmd 755 root root -"
|
"d /var/spool/slurmd 755 root root -"
|
||||||
|
"d ${cfg.mpi.PmixCliTmpDirBase} 755 root root -"
|
||||||
];
|
];
|
||||||
|
|
||||||
services.openssh.settings.X11Forwarding = lib.mkIf cfg.client.enable (lib.mkDefault true);
|
services.openssh.settings.X11Forwarding = lib.mkIf cfg.client.enable (lib.mkDefault true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue