3 – Using InfiniPath MPI Getting Started with MPI

Q

These examples assume that:

Your cluster administrator has properly installed InfiniPath MPI and the PathScale compilers.

Your cluster’s policy allows you to use the mpirun script directly, without having to submit the job to a batch queuing system.

You or your administrator has properly set up your ssh keys and associated files on your cluster. See section 3.5.1 and section 2.9 for details on ssh administration.

To begin, copy the examples to your working directory:

$ cp /usr/share/mpich/examples/basic/* .

Next, create an MPI hosts file in the same working directory. It contains the host names of the nodes in your cluster on which you want to run the examples, with one host name per line. Name this file mpihosts. The contents can be in the following format:

hostname1

hostname2

...

There is more information on the mpihosts file in section 3.5.6.

3.3.1

An Example C Program

InfiniPath MPI uses some shell scripts to find the appropriate include files and libraries for each supported language. Use the script mpicc to compile an MPI program in C and the script mpirun to execute it.

The supplied example program cpi.c computes an approximation to pi. First, compile it to an executable named cpi.

$ mpicc -o cpi cpi.c

mpicc, by default, runs the PathScale pathcc or gcc compiler, and is used for both compiling and linking, exactly as you'd use the pathcc command.

NOTE: On ppc64 systems, gcc is the default compiler. For information on using other compilers, see section 3.5.3.

Then, run it with several different specifications for the number of processes:

$ mpirun -np 2 -m mpihosts ./cpi Process 0 on hostname1

Process 1 on hostname2

pi is approximately 3.1416009869231241, Error is 0.0000083333333309

wall clock time = 0.000149

3-2

IB6054601-00 D

Page 44
Image 44
Q-Logic IB6054601-00 D manual An Example C Program, There is more information on the mpihosts file in section

IB6054601-00 D specifications

The Q-Logic IB6054601-00 D is a high-performance InfiniBand adapter card designed for data centers and enterprise applications requiring robust connectivity and low-latency communication. This adapter is part of QLogic's extensive portfolio of networking solutions, catering to the needs of high-performance computing (HPC), cloud computing, and virtualization environments.

One of the standout features of the IB6054601-00 D is its capability to support data transfer rates of up to 56 Gbps. This makes it ideal for applications demanding large bandwidth and quick data processing. The adapter is optimized for RDMA (Remote Direct Memory Access) technology, which allows data to be transferred directly between the memory of different computers without involving the CPU. This reduces latency and CPU overhead, leading to enhanced overall system performance.

The architecture of the IB6054601-00 D includes support for a dual-port design, which offers increased bandwidth, redundancy, and fault tolerance. This dual-port configuration is especially advantageous for environments that require high availability and reliability, such as financial services and mission-critical applications.

The adapter utilizes advanced error detection and correction mechanisms, ensuring that data integrity is maintained during transmission. With features like adaptive routing and congestion management, the IB6054601-00 D is capable of optimizing the handling of data flows, thereby enhancing performance even under heavy loads.

In terms of compatibility, the Q-Logic IB6054601-00 D supports a wide range of operating systems and virtualization technologies, making it easy to integrate into diverse IT environments. It also includes drivers and software packages that facilitate seamless deployment and management.

In addition to high-speed connectivity, the adapter is designed with power efficiency in mind. It adheres to Energy Star regulations, helping organizations lower their operational costs while minimizing their environmental footprint.

Overall, the Q-Logic IB6054601-00 D stands out for its high throughput, low latency, and reliability. Its combination of advanced features and technologies positions it as an excellent choice for organizations looking to enhance their data center performance and maximize the efficiency of their network infrastructure. With the growing demands for faster and more efficient data transfer, solutions like the IB6054601-00 D are essential in meeting the evolving needs of modern enterprises.