Open MPI Delivered with the IB Driver
Scenarios
This section describes how to run Open MPI (version 3.1.0rc2 is used as an example) delivered with the IB driver in a BMS cluster.
Prerequisites
- Password-free login has been configured between BMSs in the cluster.
- Open MPI delivered with the IB driver has been installed on all BMSs in the cluster.
Procedure
- Disable the firewall.
- Modify the configuration file.
- Log in to a BMS in the cluster.
- Run the following command to obtain the BMS hostname:
Figure 2 Viewing the BMS hostname
- Log in to all other BMSs in the cluster and repeat 1.b to 2.b to obtain hostnames of all BMSs.
- Log in to a BMS in the cluster.
- Run the following command to add the hosts configuration file:
Add the private network IP addresses and hostnames of all BMSs in the cluster. For example, run the following commands:
192.168.0.1 bms-0004
192.168.0.2 bms-0005
...
- Run the following command to add the hostfile file:
$vi hostfile
Add hostnames of all BMSs in the cluster, for example:
bms-0004
bms-0005
...
- Log in to other BMSs in the cluster and repeat 2.e to 2.f.
- Run MPI benchmark.
- Perform the following command on any BMS to check whether the hostfile file has been configured:
$ mpirun -np 2 -pernode --hostfile hostfile -mca btl_openib_if_include "mlx5_0:1" -x MXM_IB_USE_GRH=y hostname
If the hostnames of all BMSs in the cluster are displayed, as shown in Figure 3, the hostfile file has been configured.
- Run the MPI benchmark on any BMS with the hostfile path specified.
For example, there are two BMSs in the cluster. Then, run the following command:
$ mpirun -np 2 -pernode --hostfile hostfile -mca btl_openib_if_include "mlx5_0:1" -x MXM_IB_USE_GRH=y /usr/mpi/gcc/openmpi-3.1.0rc2/tests/imb/IMB-MPI1 PingPong
If information shown in Figure 4 is displayed, Open MPI delivered with the IB driver is running in the cluster.
- Perform the following command on any BMS to check whether the hostfile file has been configured:
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot