services.slurm: add sockets option

This commit is contained in:
2024-03-09 18:44:30 +08:00
parent 499f2e0fb3
commit 3a269a9897
2 changed files with 6 additions and 5 deletions

View File

@@ -84,10 +84,10 @@ inputs:
};
slurm =
{
enable = false;
cpu = { cores = 16; threads = 2; };
memoryMB = 94208;
gpus = { "3090" = 1; "4090" = 1; };
enable = true;
cpu = { sockets = 2; cores = 22; threads = 2; };
memoryMB = 253952;
gpus = { "p400" = 1; };
};
xrdp = { enable = false; hostname = [ "xmupc2.chn.moe" ]; };
samba =

View File

@@ -5,6 +5,7 @@ inputs:
enable = mkOption { type = types.bool; default = false; };
cpu =
{
sockets = mkOption { type = types.ints.unsigned; default = 1; };
cores = mkOption { type = types.ints.unsigned; };
threads = mkOption { type = types.ints.unsigned; default = 1; };
};
@@ -47,7 +48,7 @@ inputs:
[
"localhost"
"RealMemory=${builtins.toString slurm.memoryMB}"
"Sockets=1"
"Sockets=${builtins.toString slurm.cpu.sockets}"
"CoresPerSocket=${builtins.toString slurm.cpu.cores}"
"ThreadsPerCore=${builtins.toString slurm.cpu.threads}"
"Gres=${gpuString}"