运行和验证
操作步骤
- 使用PuTTY工具,以root用户登录服务器。
- 执行以下命令解压算例文件。
cd /path/to/CASE tar xzvf v6-50-specific-inputs-180430.tgz tar xzvf CAMx6-x-test_run-inputs_met-140402.tgz tar xzvf CAMx6-30-test_run-inputs_other-160408.tgz
- 执行以下命令拷贝测试脚本。
cd runfiles cp CAMx_v6.50.midwest.36.12.20020506-07.MPICH2.job openmpi4.job
- 执行以下命令修改测试脚本。
- 打开测试脚本。
vi openmpi4.job
- 按“i”进入编辑模式,修改测试脚本,注意粗体部分。
set EXEC = "/path/to/CAMX/CAMX_v6-50/CAMx.v6.50.openMPI.gfortranomp" cat << ieof > nodes 192.168.47.111 set NUMPROCS = 96 #mpdboot -n $RING -f nodes --verbose if( ! { mpirun --allow-run-as-root --mca btl_openib_allow_ib 1 -machinefile nodes -np $NUMPROCS $EXEC } ) then #mpdallexit exit endif
- 按“Esc”键,输入:wq!,按“Enter”保存并退出编辑。
- 打开测试脚本。
- 执行以下命令运行测试。
./openmpi4.job
需要查看日志中最后一个Info:Benchmark time中的“days/ns”数值,单位是“days/ns”,数值越小性能越优(也可以转换成“ns/days”的数值,越高性能越好)。
输出的结果样例如图1所示。