Skip to content

Commit

Permalink
Update slides
Browse files Browse the repository at this point in the history
  • Loading branch information
trossi committed Jun 20, 2024
1 parent 8a8ba43 commit 07dc20a
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions gpu-hip/docs/05-multi-gpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ lang: en
* GPU context
* Device management
* Programming models
* Peer to peer (GPU-GPU) access
* HIP/OpenMP + MPI
* Peer to peer (GPU-GPU) access


# Introduction
Expand Down Expand Up @@ -95,7 +95,7 @@ hipError_t hipGetDeviceProperties(struct hipDeviceProp *prop, int device)

# One GPU per process

* Recommended for multi-process applications using a message passing library
* Recommended for multi-process applications using MPI
* Message passing library takes care of all GPU-GPU communication
* Each process interacts with only one GPU which makes the implementation
easier and less invasive (if MPI is used anyway)
Expand All @@ -105,16 +105,12 @@ hipError_t hipGetDeviceProperties(struct hipDeviceProp *prop, int device)
# Compling MPI+HIP/OpenMP code

* Compiling HIP/OpenMP and MPI calls in the same compilation unit may not always be trivial
* On LUMI, use `CC` compiler wrapper
* On LUMI, `CC` compiler wrapper takes care of this
* One can set MPI compiler to use `hipcc` or the desirable OpenMP compiler like `nvc`, e.g. for OpenMPI:
```bash
OMPI_CXXFLAGS='' OMPI_CXX='hipcc'
OMPI_CXXFLAGS='' OMPI_CXX='hipcc' # hip
OMPI_CXXFLAGS='' OMPI_CXX='nvc -mp=gpu -gpu=cc80' # nvc
```
or
```bash
OMPI_CXXFLAGS='' OMPI_CXX='nvc -mp=gpu -gpu=cc80'
```

* Alternatively, one could separate HIP/OpenMP and MPI code in different compilation units compiled with `mpicxx` and `hipcc`/`nvc`
* Link object files in a separate step using `mpicxx` or `hipcc`/`nvc`

Expand Down

0 comments on commit 07dc20a

Please sign in to comment.