Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
2275 토론

Hybrid OpenMP+MPI: How to synchronize access to MPI shared RMA window by multiple OpenMP threads ?

ArthurRatz
초보자
1,756 조회수

Dear Collegues,

I've developed parallel code that implements both OpenMP + MPI hybrid parallelization and allocates a shared RMA window by calling MPI_Win_allocate_shared function to store the data shared among multiple OpenMP threads executed withing several MPI processes.

Is there any chance to synchronize access to the shared RMA window by the number of OpenMP threads executed within multiple MPI processes.?

Is there any pattern for hybrid OpenMP + MPI programming ?

Thanks for your replies in advance.

Cheers, Arthur.

0 포인트
1 솔루션
James_T_Intel
중재자
1,756 조회수

Can you explain in more detail how you're trying to control your synchronization?

I personally would not use MPI_Win_allocate_shared along with OpenMP.  MPI_Win_allocate_shared is intended as a means of local shared memory similar to threading, but without having to implement threading.  At the point that threading is implemented, I'd aim for having a single rank per node, and use threading within that rank to fully utilize the node.

Is it doable?  Absolutely.  But MPI mostly expects you to control access to shared memory much more directly than OpenMP requires.  So it's going to take more effort.

원본 게시물의 솔루션 보기

0 포인트
6 응답
Andrey_C_Intel1
1,756 조회수

Hi Arthur,

I am moving your question to Intel MPI forum for experts on MPI internals, as it does not relate to the open source runtime library.

Regards,
Andrey
 

0 포인트
James_T_Intel
중재자
1,757 조회수

Can you explain in more detail how you're trying to control your synchronization?

I personally would not use MPI_Win_allocate_shared along with OpenMP.  MPI_Win_allocate_shared is intended as a means of local shared memory similar to threading, but without having to implement threading.  At the point that threading is implemented, I'd aim for having a single rank per node, and use threading within that rank to fully utilize the node.

Is it doable?  Absolutely.  But MPI mostly expects you to control access to shared memory much more directly than OpenMP requires.  So it's going to take more effort.

0 포인트
ArthurRatz
초보자
1,756 조회수

Thanks for your reply. Can you explain me how to implement global shared memory using MPI and not using MPI_Win_allocate_shared at the same time ? Thanks for your reply in advance.

Cheers, Arthur.

0 포인트
James_T_Intel
중재자
1,756 조회수
0 포인트
ArthurRatz
초보자
1,756 조회수

Thanks for reply.

0 포인트
ArthurRatz
초보자
1,756 조회수

Can you provide an example of using MPI_Send/MPI_Recv instead to maintain a shared memory between processes on different nodes ?

0 포인트
응답