Compare commits

..

5 Commits

Author SHA1 Message Date
chn
5a0bf76710 modules.services.slurm: fix gpu string 2024-09-23 14:16:29 +08:00
chn
4600e2e3f1 packages.vasp.intel: fix 2024-09-22 17:46:11 +08:00
chn
575943c869 devices.pc: disable user zzn 2024-09-22 17:45:55 +08:00
chn
93fc9897da devices.pc: fix sbatch-tui 2024-09-22 17:33:37 +08:00
chn
adb1b2a560 packages.sbatch-tui: fix 2024-09-22 17:28:21 +08:00
4 changed files with 12 additions and 11 deletions

View File

@ -137,13 +137,13 @@ inputs:
gpus."4060" = 1;
};
partitions.localhost = [ "pc" ];
tui = { cpuMpiThreads = 4; cpuOpenmpThreads = 4; gpus = [ "4060" ]; };
};
ollama = {};
waydroid = {};
docker = {};
};
bugs = [ "xmunet" "backlight" "amdpstate" ];
user.users = [ "chn" "zzn" ];
};
boot =
{

View File

@ -27,7 +27,7 @@ inputs:
{
cpuMpiThreads = mkOption { type = types.ints.unsigned; default = 1; };
cpuOpenmpThreads = mkOption { type = types.ints.unsigned; default = 1; };
gpus = mkOption { type = types.nullOr (types.attrsOf types.ints.unsigned); default = null; };
gpus = mkOption { type = types.nullOr (types.listOf types.nonEmptyStr); default = null; };
};
# 是否打开防火墙相应端口,对于多节点部署需要打开
setupFirewall = mkOption { type = types.bool; default = false; };

View File

@ -130,20 +130,21 @@ int main()
state.submit_command =
"sbatch --ntasks=1\n--gpus=1\n--job-name='{}'\n--output='{}'\nvasp-nvidia-{}"_f
(state.job_name, state.output_file, state.vasp_version_entries[state.vasp_version_selected]);
else if (state.device_type_entries[state.device_type_selected] == "CPU")
else if (state.device_type_entries[state.device_type_selected] == "manually select GPU")
state.submit_command =
"sbatch --ntasks={}\n--cpus-per-task={}\n--hint=nomultithread\n--job-name='{}'\n--output='{}'"
"\nvasp-intel-{}"_f
"sbatch --ntasks=1\n--gres=gpu:{}:1\n--job-name='{}'\n--output='{}'\nvasp-nvidia-{}"_f
(
state.mpi_threads, state.openmp_threads, state.job_name, state.output_file,
state.vasp_version_entries[state.vasp_version_selected]
state.gpu_entries[state.gpu_selected],
state.job_name, state.output_file, state.vasp_version_entries[state.vasp_version_selected]
);
else state.submit_command =
"sbatch --ntasks=1\n--gres=gpu:{}:1\n--job-name='{}'\n--output='{}'\nvasp-nvidia-{}"_f
"sbatch --ntasks={}\n--cpus-per-task={}\n--hint=nomultithread\n--job-name='{}'\n--output='{}'"
"\n--wrap=\"vasp-intel srun vasp-{}\""_f
(
state.gpu_entries[state.gpu_selected],
state.job_name, state.output_file, state.vasp_version_entries[state.vasp_version_selected]
state.mpi_threads, state.openmp_threads, state.job_name, state.output_file,
state.vasp_version_entries[state.vasp_version_selected]
);
screen.Loop(confirm_interface);
if (state.user_command == "quit") return EXIT_FAILURE;
else if (state.user_command == "back") continue;

View File

@ -42,7 +42,7 @@ in writeShellScriptBin "vasp-intel"
export LD_LIBRARY_PATH=${libfabric}/lib''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
# intel mpi need this to talk with slurm
${lib.optionalString integratedWithSlurm "export I_MPI_MPI_LIBRARY=${slurm}/lib/libpmi2.so"}
${lib.optionalString integratedWithSlurm "export I_MPI_PMI_LIBRARY=${slurm}/lib/libpmi2.so"}
# add vasp and intel mpi in PATH
export PATH=${vasp}/bin:${mpi}/bin''${PATH:+:$PATH}