ATAT 专题

ATAT 任务组织与 MPI 命令

任务状态、负载工具、集群MPI入口和命令列表划分的8个命令。

更新于 2026-10-24约 8 分钟阅读按任务与环境选择适用配置
阅读本篇目录

ATAT 专题导读 · 完整教程与算例

任务状态、负载工具、集群MPI入口和命令列表划分的8个命令。 每条列出用途、输入输出、调用格式和使用条件;展开参数表可查看 ATAT 3.52 的原始英文选项与默认值。

[int] 表示整数,[real] 表示实数,[string] 表示文件名或文本;同名参数在不同命令中的含义可能不同。调用前应准备对应输入文件。

任务组织和 MPI#

pollmach#

监控 wait/busy 等文件并向可用计算环境派发命令。

输入与结果: 结构目录、任务命令、可选机器列表 → 计算启动与状态标记。

调用格式:

pollmach -e -m .local-only runstruct_vasp

不存在的显式机器文件用于限定本地顺序模式;-e 无任务即结束;-il 交互循环;-w 等子进程;stoppoll 正常停。集群中应在 Slurm 已分配资源内使用,不配置越过调度的机器列表。

展开本命令的完整参数表
Syntax: pollmach [-f] [-e] [-m alternate_machine_configuration_file] [-s] [-w] command_to_run

This command periodically checks the load on various machines
(specified in the file ~/.machines.rc)
and looks for subdirectories containing a file called "wait".
If the load on a machine is sufficiently low, it executes command_to_run
on that machine, in the directory where the oldest wait file lies.
A default ~/.machines.rc file is created the first time the chl command
is run. The format of the file is explained in the comments therein.
If no ~/.machines.rc file exists, command_to_run is run sequentially on
the local computer in each directory containing a "wait" file.
This is the single-machine mode.

When using this command with maps, command_to_run will typically be runstruct_vasp

The -m option overrides the default ~/.machines.rc (it is optional).

The -e option specifies that the command should terminate when no more
"wait" files are to be found (only works in single-machine (sequential) mode,
when no ~/.machines.rc file is given).

The -f option forces the command to run even if of pollmach_is_running file exists.

The -s option cause pollmach to self-manage the load (it does not poll the nodes for their loads
but instead keeps track of where it sends a job and does not send any other job to that node until it is done.
The first column in the machine_configuration_file is ignored and can be omitted.

The -w option tells pollmach to wait until all sub processes have finished before quitting.

The -il interactive loop option (beta). Here pollmach waits for a file called 'busy' to be created,
        then runs command and then deletes 'busy'.
        This repeats itself until a stop or stoppoll file is created.

The -t "command" option first runs "command" and, only if its return code is 0, runs command_to_run.

To cleanly stop this program, type
        touch stoppoll

chl#

按照机器配置中的命令查询负载。

输入与结果: -m 配置或 ~/.machines.rc → 负载与运行前缀列表。

调用格式:

chl -m machines.test

配置中的命令会被执行。旧式多机管理工具,常规集群任务使用 Slurm;随文仅用本地固定输出演示格式。首次缺配置可能创建默认文件。

minload#

从负载配置中选择当前最低负载对应的命令前缀。

输入与结果: 同 chl → 命令前缀或 none。

调用格式:

minload -m machines.test

-w 等待可用条目。不会替你申请 Slurm 资源;不能拿它在未分配节点上启动生产计算。

展开本命令的完整参数表
Syntax: minload [-m alternate_machine_config_file] [-w]
Returns the command prefix needed to run a command on the remote
machine having the minimum load, among the
machines listed in the ~/.machines.rc file
(or as specified by the -m option).
A default ~/.machines.rc file is created the first time
the chl command is run and the file format is described
in the comments therein.

node#

在远端同一路径执行命令的旧式包装。

输入与结果: 主机、命令,可选复制设置 → 远端执行结果。

调用格式:

node -s user@host command

-s 使用 SSH;-r 复制当前目录后执行。需要明确的远程访问和计算资源权限。本文常规工作流使用 Slurm,不依赖该命令派发科学计算。

展开本命令的完整参数表
This command is basically like rsh, except that the command
makes sure that the current directory on the remote machine 
is the same as on the local machine.
(If the two machines do not share the same disk space, use the -r option.)

Syntax: node [-s] [-r] user@host command
 -s: use ssh instead of rsh
 -r: copy files in current directory to remote host before running command
 if user is the same on remote host, use may use
   node [-s] [-r] host command

atat-mpigenstr#

集群的 MPI 结构枚举入口。

输入与结果: Slurm 核数和 genstr 参数 → 枚举结构。

调用格式:

atat-mpigenstr -n=4 > genstr.out

包装 libexec/mpi/mpigenstr,自动选择独立 OpenMPI。不要再次 mpirun;不代表每个小枚举任务都会因 MPI 更快。

atat-mpimmaps#

集群的 MPI 多元簇展开入口。

输入与结果: Slurm 分配和 mmaps 输入 → 拟合与结构选择结果。

调用格式:

atat-mpimmaps -d

包装底层 mpimmaps,状态文件约定与 mmaps 一致。不要与正在工作的串行 mmaps 共用一个计算目录。

atat-dispatch#

动态分配命令列表给 MPI 工作进程。

输入与结果: Slurm 分配、每行一条命令的文件 → 各命令结果。

调用格式:

atat-dispatch jobs.in

底层 dispatch 使用一个调度进程,其余为执行进程,所以至少需要两个 rank。每个子命令自身并行时要防止总核数超出分配。命令列表应可信且以换行结束。

splitjob#

按行号轮转分配命令列表给各 MPI rank。

输入与结果: 每行一条命令的文件 → 各条目执行结果。

调用格式:

mpirun -np 2 splitjob jobs.in

需要与其构建匹配的 OpenMPI 环境,外部 mpirun 是必要的。与 dispatch 不同,它是静态划分;不能指望空闲 rank 动态接手长任务。空行可能结束列表读取,没有通用 -h 模式。

MPI 底层名称与上游附加接口#

底层程序 常用入口 关系
mpigenstr atat-mpigenstr 相同 MPI 枚举程序,后者配置本集群运行环境
mpimmaps atat-mpimmaps 相同 MPI 多元拟合程序,后者处理调度核数与 MPI
dispatch atat-dispatch 相同动态派发程序,后者是集群包装
splitjob splitjob 已经在 78 个入口中列出,由匹配的 MPI 启动

底层程序保存在 ATAT 安装前缀的 libexec/mpi。一般用户优先使用现行作业模板;底层 MPI 程序的存在不表示任意 MPI 版本都能混用。

上游还附有 Quantum ESPRESSO、ABINIT、CASTEP 等接口脚本,以及未安装到当前 PATH 的开发工具。这些不属于本模块的 78 个命令入口,也不能据此声称本集群已配置对应的端到端工作流。切换能量程序时,关键是保持结构、能量单位、原子顺序、受力格式与统计模型一致。

原始参数清单来源:ATAT 3.52 本机程序输出;作者 Axel van de Walle 及各工具贡献者。中文说明为鸢算科技独立编写,算法出处与引用见完整教程。

原始参数表来自 ATAT 3.52,作者 Axel van de Walle 及相应贡献者。中文说明由鸢算科技编写;算法出处与论文引用。

需要根据你的体系选择资源?联系讨论计算需求。实际可用软件与权限,以当前账户和运行环境为准。

查看配图

放大后可滚动查看细节,按 Esc 关闭。

100%查看原图 ↗