nep框架重构

This commit is contained in:
2025-12-09 01:15:38 +08:00
parent 19a6924a41
commit 91bdb0dab1
30 changed files with 7930 additions and 1001 deletions

View File

@@ -1,58 +1,21 @@
# config/machine.yaml
machine_name: "Local_Test_Env"
root_dir: "." # <--- 请修改这里为你的实际路径
# 当前使用的计算系统配置名
current_system: "interactive_gpu"
# 脚本库位置
script_dir: "config/scripts"
systems:
# --- 配置 1: 交互式 GPU 环境 (当前使用) ---
# 场景: 你已经用 srun/tmux 申请到了资源,直接运行命令即可
interactive_gpu:
type: "local" # local 表示直接运行 subprocess不提交 sbatch
executors:
# 1. 简单的本地命令 (如 NEP 训练)
nep_local:
type: "local"
cmd: "nep"
# 路径配置
gpumdkit_root: "/cluster/home/koko125/tool/GPUMDkit"
# 2. 复杂的本地脚本 (如 GPUMD)
gpumd:
type: "local"
cmd: "gpumd" # 对应 config/scripts/gpumd.sh
tools:
# 1. GPUMD 配置
gpumd:
command: "gpumd"
# 运行前需要 source 的环境脚本
env_setup: ""
gpu_id: 0
# 2. NEP 配置 (同上)
nep:
command: "nep"
env_setup: ""
gpu_id: 0
gpumdkit:
# 假设是 GPU 版本,可能不需要 mpirun 或者只需要少量核
command: "gpumdkit.sh"
env_setup: ""
# 即使是 local 模式,有时也需要指定并行度
n_procs: 1
# 3. VASP (GPU 版) 配置
vasp:
# 假设是 GPU 版本,可能不需要 mpirun 或者只需要少量核
command: "mpirun -np 1 vasp_std"
env_setup: ""
# 即使是 local 模式,有时也需要指定并行度
n_procs: 1
# --- 配置 2: VASP CPU 集群模式 (预留,未来使用) ---
# 场景: 需要生成 submit.slurm 并 sbatch 提交
slurm_cpu_cluster:
type: "slurm"
gpumdkit_root: "/cluster/home/koko125/tool/GPUMDkit"
tools:
vasp:
command: "mpirun -np 4 vasp_std"
env_setup: "module load vasp/6.3-cpu"
# Slurm 头部参数
slurm_header:
partition: "cpu_long"
ntasks_per_node: 64
time: "24:00:00"
# 3. Slurm 提交测试 (VASP CPU)
vasp_cpu:
type: "local"
cmd: "mpirun -np 1 vasp_std"