Skip to content

Conversation

@LenaO
Copy link
Collaborator

@LenaO LenaO commented Oct 28, 2021

No description provided.

const int bottom = 0;
#endif

// TODO: Use MPI_Sendrecv to exchange the data with the top and bottom neighbors
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a bit more help with the argument for the MPI_Sendrecv calls might be needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Maybe sketch the call in the // TODO a bit. One might also give parts of the options.

LenaO and others added 6 commits October 29, 2021 08:33
Co-authored-by: Jiri Kraus <jkraus@nvidia.com>
Co-authored-by: Jiri Kraus <jkraus@nvidia.com>
Co-authored-by: Jiri Kraus <jkraus@nvidia.com>
Co-authored-by: Jiri Kraus <jkraus@nvidia.com>
Co-authored-by: Jiri Kraus <jkraus@nvidia.com>
Co-authored-by: Jiri Kraus <jkraus@nvidia.com>
Copy link
Member

@AndiH AndiH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comments…


## Hands-ON 5: Multi GPU parallelization with CUDA-aware MPI

## Task 1: Parallelize the jacobi solver for multiple GPUs using CUDA-aware MPI
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Task 1: Parallelize the jacobi solver for multiple GPUs using CUDA-aware MPI
## Task 1: Parallelize Jacobi Solver for Multiple GPUs using CUDA-aware MPI
const int bottom = 0;
#endif

// TODO: Use MPI_Sendrecv to exchange the data with the top and bottom neighbors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Maybe sketch the call in the // TODO a bit. One might also give parts of the options.

Comment on lines +18 to +32
- Initialize the MPI application
- Include the MPI header file
- Determine the local rank and the number of MPI processes
- Query the number of GPUs visible to the calling process.
- Use a local communicator to assign one GPU to each MPI process
- Finalize MPI at the end of the application
- Compute the 1-D domain decomposition
- Compute the local chunk size to distribute (ny-2) lines among the process
- in case `(ny-2)%size != 0` the last process should calculate the remaining rows
- determine the global (`iy_start_global, iy_end_global`) and local (`iy_start, iy_end`) start and end points in the 2-dimensional grid.
- Use MPI to exchange the boundaries
- Compute the top and the bottom neighbor
- we are using reflecting/periodic boundaries on top and bottom, so rank0's Top neighbor is (size-1) and rank(size-1) bottom neighbor is rank 0
- Use MPI_Sendrecv to exchange data between the neighbors
- use the self-defined MPI_REAL_TYPE. This allows an easy switch between single- and double precision
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that are too many complicated things which can go wrong…

make run
```

## Task 1: Optimize load balancing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Task 1: Optimize load balancing
## Advanced Task: Optimize Load Balancing

This is how it was meant, right?

LenaO and others added 6 commits October 29, 2021 14:17
Co-authored-by: Jiri Kraus <jkraus@nvidia.com>
Co-authored-by: Andreas Herten <a.herten+github@gmail.com>
Co-authored-by: Andreas Herten <a.herten+github@gmail.com>
Co-authored-by: Andreas Herten <a.herten+github@gmail.com>
Co-authored-by: Andreas Herten <a.herten+github@gmail.com>
Co-authored-by: Andreas Herten <a.herten+github@gmail.com>
@jirikraus
Copy link
Collaborator

We can close this right?

@AndiH AndiH merged commit eb7e666 into FZJ-JSC:main Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants