Updated on 2022-05-09 GMT+08:00

Spectrum MPI

Scenarios

This section describes how to run Spectrum MPI (IBM Spectrum MPI v10.1) on a configured ECS.

Prerequisites

  • An ECS equipped with InfiniBand NICs has been created, and an EIP has been bound to it.
  • Multiple ECSs have been created using a private image.

Procedure

  1. Use PuTTY and a key pair to log in to the ECS.

    Ensure that the username specified during ECS creation is used to establish the connection.

  2. Run the following command to disable user logout upon system timeout:

    # TMOUT=0

  3. Run the following command to check whether the ECSs to be tested can be logged in to from each other without a password:

    $ ssh Username@SERVER_IP

  4. Run the following commands to disable the firewall of the ECS:

    # iptables -F

    # service firewalld stop

  5. Run the executable file in the cluster using Spectrum MPI (use IP:Number as parameter hostlist).
    • IP indicates the IP addresses of the ECSs in the cluster.
    • Number indicates the number of tasks on an ECS.

    For example, there are two ECSs with hostnames host-192-168-0-27 and host-192-168-0-75 in the cluster, and the executable file spe_hello is stored in /root/spe_hello. Then, run the following command:

    # mpirun --allow-run-as-root -np 2 -hostlist host-192-168-0-27,host-192-168-0-75 /root/spe_hello

    Figure 1 Running the executable file in the cluster using Spectrum MPI

    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.