Skip to content

Commit cd96641

Browse files
committed
Add warning against using blocking communication calls within a VMEpoch region.
1 parent fa8f8be commit cd96641

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Infrastructure/VM/doc/VM_rest.tex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919

2020
\item {\bf Data arrays in VM comm calls are {\em assumed shape} with rank=1.} Currently all dummy arrays in VM comm calls are defined as {\em assumed shape} arrays of rank=1. The motivation for this choice is that the use of assumed shape dummy arrays guards against the Fortran copy in/out problem. However it may not be as flexible as desired from the user perspective. Alternatively all dummy arrays could be defined as {\em assumed size} arrays, as it is done in most MPI implementations, allowing arrays of various rank to be passed into the comm methods. Arrays of higher rank can be passed into the current interfaces using Fortran array syntax. This approach is explained in section \ref{vm_higherrank}.
2121

22+
\item {\bf Limitations when using VMEpoch.} Using a blocking collective call (e.g. the MPI_Bcast() used by ESMF_InfoBroadcast(), ESMF_VMBroadcast(), etc.) within the region enclosed by {\tt ESMF\_VMEpochEnter()} and {\tt ESMF\_VMEpochExit()} will result in a deadlock.
23+
24+
2225
\end{enumerate}
2326

2427

src/Infrastructure/VM/interface/ESMF_VM.F90

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4275,7 +4275,9 @@ subroutine ESMF_VMEpochEnter(keywordEnforcer, vm, epoch, keepAlloc, throttle, rc
42754275
! Enter a specific VM epoch. VM epochs change low level communication behavior
42764276
! which can have significant performance implications. It is an error to call
42774277
! {\tt ESMF\_VMEpochEnter()} again before exiting a previous epoch with
4278-
! {\tt ESMF\_VMEpochExit()}.
4278+
! {\tt ESMF\_VMEpochExit()}. Also, blocking collective calls
4279+
! (e.g. {\tt ESMF\_VMBroadcast()) should not be used within a VMEpoch region.
4280+
! Doing so will result in a deadlock.
42794281
!
42804282
! The arguments are:
42814283
! \begin{description}

0 commit comments

Comments
 (0)