Community Open MPI
Scenarios
This section describes how to run community Open MPI (version 3.1.1 is used as an example) in a BMS cluster.
Prerequisites
- Password-free login has been configured between BMSs in the cluster.
- Community Open MPI has been installed on all BMSs in the cluster.
Procedure
- Disable the firewall.
- Log in to a BMS in the cluster.
- Run the following command to disable the BMS firewall:
# service firewalld stop
# iptables -F
- Run the following command to check whether the firewall has been disabled:
# service firewalld status
Figure 1 Disabled firewall
- Log in to all other BMSs in the cluster and repeat steps 1.b to 1.c to disable firewalls on all BMSs.
- Modify the configuration file.
- Log in to a BMS in the cluster.
- Run the following command to obtain the BMS hostname:
$ hostname
Figure 2 Viewing the BMS hostname
- Log in to all other BMSs in the cluster and repeat steps 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:
# vi /etc/hosts
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 steps 2.e to 2.f.
- Log in to any BMS and run the community Open MPI.
For example, there are two BMSs in the cluster. Then, run the following command:
$ mpirun -np 2 --pernode -hostfile hostfile /home/rhel/hello
Figure 3 Successful execution of community Open MPI in the cluster
Specify the path of hostfile when running it. The path of the executable file hello must be absolute. All executable files in the cluster must be in the same directory.
Last Article: Open MPI Delivered with the IB Driver
Next Article: Spectrum MPI
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.