By default, for Open MPI 4.0 and later, infiniband ports on a device are not used by default. The intent is to use UCX for these devices. You can override this policy by setting the btl_openib_allow_ib MCA parameter to true. Local host: infinity Local adapter: mlx4_0 Local port: 1 -------------------------------------------------------------------------- -------------------------------------------------------------------------- WARNING: There was an error initializing an OpenFabrics device. Local host: infinity Local device: mlx4_0 -------------------------------------------------------------------------- :-) GROMACS - gmx pdb2gmx, 2023.2 (-: Executable: /public/software/gromacs-2023.2/bin/gmx_mpi Data prefix: /public/software/gromacs-2023.2 Working dir: /public/home/zkj/BSLA_in_Menthol_and_Olecicacid/run1 Command line: gmx_mpi pdb2gmx -f BSLA.pdb -o BSLA.gro -p BSLA_M_O.top-water spec-ignh ------------------------------------------------------- Program: gmx pdb2gmx, version 2023.2 Source file: src/gromacs/commandline/cmdlineparser.cpp (line 271) Function: void gmx::CommandLineParser::parse(int*, char**) Error in user input: Invalid command-line options In command-line option -p Too many values For more information and tips for troubleshooting, please check the GROMACS website at http://www.gromacs.org/Documentation/Errors
时间: 2025-04-29 19:50:22 浏览: 35
从你提供的信息来看,遇到了两个方面的问题:
### 一、Open MPI 和 InfiniBand 设备初始化错误
根据日志显示,在尝试运行 `gmx_mpi` 的时候出现了警告信息:
```
WARNING: There was an error initializing an OpenFabrics device.
Local host: infinity
Local device: mlx4_0
```
这表明默认情况下,自 Open MPI 4.0 版本以来为了更好的兼容性和性能选择,默认不再启用设备上的InfiniBand端口,并计划通过UCX(Unified Communication X)来处理这些高性能网络通信任务。如果你确实需要使用 InfiniBand 端口,则可以设置环境变量或者命令行参数 `btl_openib_allow_ib=true` 来覆盖这个策略。
#### 解决方案建议:
1. **检查是否真的需要用到 IB 协议**:如果不是特别需求不需要强制开启的话,那么忽略该提示也是可行的选择之一;
2. **如果确定要用到IB协议**:可以在启动MPI程序之前设定相应的MCA参数,
```bash
export OMPI_MCA_btl_openib_allow_ib=1 # Linux shell 下添加此配置项
# 或者直接在 mpirun 命令中指定 --mca 参数
mpirun --mca btl_openib_allow_ib 1 <your_program>
```
### 二、GROMACS 命令解析失败问题
对于第二个报错部分来说:
```
Error in user input:
Invalid command-line options
In command-line option -p
Too many values
```
这里明显是因为你在提供给 `-p` 参数后面的值过多所导致的。“-p”选项只接受单个拓扑文件作为输入路径,但是似乎你在后面跟了不止一个参数。
#### 正确用法应该是类似这样的形式:
```shell
gmx_mpi pdb2gmx -f BSLA.pdb -o BSLA.gro -p BSLA_M_O.top
```
其中每一个开关都只需要对应单一的目标文件即可。另外需要注意的是,“water spec-ignh”这部分看起来像是试图传递额外的关键字参数给pdb2gmx工具,但实际上它应该放在所有带“-”标志前的位置上作为一个单独的操作指令序列传入。
阅读全文
相关推荐

















