mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-22 23:39:02 +08:00
Compare commits
5 Commits
7e38ee602e
...
5a0bf76710
Author | SHA1 | Date | |
---|---|---|---|
5a0bf76710 | |||
4600e2e3f1 | |||
575943c869 | |||
93fc9897da | |||
adb1b2a560 |
@ -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 =
|
||||
{
|
||||
|
@ -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; };
|
||||
|
@ -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;
|
||||
|
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user