NixOS configuration for HPC cluster https://docs.hpc.informatik.hs-fulda.de/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.1 KiB

11 months ago
11 months ago
9 months ago
11 months ago
9 months ago
11 months ago
9 months ago
11 months ago
  1. { pkgs, lib, config, nodes, ... }:
  2. with lib;
  3. let
  4. nodeConfig = concatStringsSep " " (mapAttrsToList
  5. (key: value: "${key}=${toString value}")
  6. {
  7. CPUs = 64;
  8. Boards = 1;
  9. SocketsPerBoard = 4;
  10. CoresPerSocket = 16;
  11. ThreadsPerCore = 1;
  12. });
  13. in
  14. {
  15. services.slurm = {
  16. clusterName = "mogli";
  17. controlMachine = "manager";
  18. nodeName = map
  19. (node: "${node.config.networking.hostName} ${nodeConfig}")
  20. (filter # Filter all nodes that have a tag "node" being a compute node
  21. (node: node.config.hpc.node.enable)
  22. (attrValues nodes));
  23. partitionName = [
  24. "all Nodes=ALL AllowGroups=cluster Default=YES MaxTime=6:00:00 State=UP"
  25. "vip Nodes=ALL AllowGroups=vip Default=NO MaxTime=INFINITE State=UP"
  26. ];
  27. };
  28. services.munge = {
  29. enable = true;
  30. password = config.sops.secrets."munge/password".path;
  31. };
  32. sops.secrets."munge/password" = {
  33. sopsFile = ./secrets.yaml;
  34. owner = "munge";
  35. };
  36. # Have a VIP group for users with unlimited queues
  37. users.groups."vip" = {
  38. members = [
  39. "fdai2856"
  40. "fdai0159"
  41. "fdai0231"
  42. ];
  43. };
  44. }