Commit 971742d5 authored by Jan Siwiec's avatar Jan Siwiec

Update gpi2.md

parent da3f0e29
Pipeline #11309 passed with stages
in 23 minutes and 27 seconds
......@@ -2,13 +2,13 @@
## Introduction
Programming Next Generation Supercomputers: GPI-2 is an API library for asynchronous interprocess, cross-node communication. It provides a flexible, scalable and fault tolerant interface for parallel applications.
Programming Next Generation Supercomputers: GPI-2 is an API library for asynchronous interprocess, cross-node communication. It provides a flexible, scalable, and fault tolerant interface for parallel applications.
The GPI-2 library implements the GASPI specification ([Global Address Space Programming Interface][a]). GASPI is a Partitioned Global Address Space (PGAS) API. It aims at scalable, flexible and failure tolerant computing in massively parallel environments.
The GPI-2 library implements the GASPI specification ([Global Address Space Programming Interface][a]). GASPI is a Partitioned Global Address Space (PGAS) API. It aims at scalable, flexible, and failure-tolerant computing in massively parallel environments.
## Modules
The GPI-2, version 1.0.2 is available on Anselm via module gpi2:
The GPI-2 version 1.0.2 is available on Anselm via the gpi2 module:
```console
$ ml gpi2
......@@ -16,14 +16,14 @@ $ ml gpi2
$ ml av GPI-2 # Salomon
```
The module sets up environment variables, required for linking and running GPI-2 enabled applications. This particular command loads the default module, which is gpi2/1.0.2
The module sets up environment variables required for linking and running GPI-2 enabled applications. This particular command loads the default gpi2/1.0.2 module.
## Linking
!!! note
Link with -lGPI2 -libverbs
Load the gpi2 module. Link using **-lGPI2** and **-libverbs** switches to link your code against GPI-2. The GPI-2 requires the OFED infinband communication library ibverbs.
Load the gpi2 module. Link using **-lGPI2** and **-libverbs** switches to link your code against GPI-2. The GPI-2 requires the OFED InfiniBand communication library ibverbs.
### Compiling and Linking With Intel Compilers
......@@ -52,7 +52,7 @@ The gaspi_run utility is used to start and run GPI-2 applications:
$ gaspi_run -m machinefile ./myprog.x
```
A machine file (** machinefile **) with the hostnames of nodes where the application will run, must be provided. The machinefile lists all nodes on which to run, one entry per node per process. This file may be hand created or obtained from standard $PBS_NODEFILE:
A machine file (** machinefile **) must be provided with the hostnames of nodes where the application will run. The machinefile lists all nodes on which to run, one entry per node per process. This file may be hand created or obtained from standard $PBS_NODEFILE:
```console
$ cut -f1 -d"." $PBS_NODEFILE > machinefile
......@@ -65,7 +65,7 @@ machinefile:
cn80
```
This machinefile will run 2 GPI-2 processes, one on node cn79 other on node cn80.
This machinefile will run 2 GPI-2 processes, one on node cn79 and one on node cn80.
machinefle:
......@@ -76,10 +76,10 @@ machinefle:
cn80
```
This machinefile will run 4 GPI-2 processes, 2 on node cn79 o 2 on node cn80.
This machinefile will run 4 GPI-2 processes, two on node cn79 and two on node cn80.
!!! note
Use the **mpiprocs**to control how many GPI-2 processes will run per node
Use the **mpiprocs**to control how many GPI-2 processes will run per node.
Example:
......@@ -92,13 +92,13 @@ This example will produce $PBS_NODEFILE with 16 entries per node.
### Gaspi_logger
!!! note
gaspi_logger views the output form GPI-2 application ranks
gaspi_logger views the output from GPI-2 application ranks.
The gaspi_logger utility is used to view the output from all nodes except the master node (rank 0). The gaspi_logger is started, on another session, on the master node - the node where the gaspi_run is executed. The output of the application, when called with gaspi_printf(), will be redirected to the gaspi_logger. Other I/O routines (e.g. printf) will not.
## Example
Following is an example GPI-2 enabled code:
Following is an example of GPI-2 enabled code:
```cpp
#include <GASPI.h>
......@@ -144,7 +144,7 @@ $ ml gcc gpi2
$ gcc helloworld_gpi.c -o helloworld_gpi.x -Wl,-rpath=$LIBRARY_PATH -lGPI2 -libverbs
```
Submit the job and run the GPI-2 application
Submit the job and run the GPI-2 application:
```console
$ qsub -q qexp -l select=2:ncpus=1:mpiprocs=1,place=scatter,walltime=00:05:00 -I
......@@ -165,6 +165,6 @@ cn79 $ gaspi_logger
[cn80:0] Hello from rank 1 of 2
```
In this example, we compile the helloworld_gpi.c code using the **gnu compiler**(gcc) and link it to the GPI-2 and ibverbs library. The library search path is compiled in. For execution, we use the qexp queue, 2 nodes 1 core each. The GPI module must be loaded on the master compute node (in this example the cn79), gaspi_logger is used from different session to view the output of the second process.
In this example, we compile the helloworld_gpi.c code using the **gnu compiler**(gcc) and link it to the GPI-2 and the ibverbs library. The library search path is compiled in. For execution, we use the qexp queue, 2 nodes 1 core each. The GPI module must be loaded on the master compute node (in this example cn79), gaspi_logger is used from a different session to view the output of the second process.
[a]: http://www.gaspi.de/en/project.html
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment