Hi, there,
In MPI_5.0.3, the MPI_TAG_UB is set to be 1681915906. But internally, the upper bound is 2^29 = 536870912, as tested out by the code attached.
Same code will run just fine in MPI 4.0.3.
Just to let you guys know the problem.
Hope to see the fix soon. Thanks.
Xudong
Encl:
2-1. Source Code
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
program main
implicit none
include"mpif.h"
real :: ibuf(10000)
integer ,save :: tag=2**29-1,ierr
integer :: req(MPI_STATUS_SIZE,2)
CALL MPI_INIT(ierr)
write(*,*)"Tag_UB=", MPI_TAG_UB, TAG
CALL MPI_IRECV(ibuf, 1000_4, MPI_REAL, 0, tag, MPI_COMM_WORLD, req(1,1), ierr)
write(*,*)"Pass ..."
tag = tag+1
write(*,*)"Tag_UB=", MPI_TAG_UB, TAG
CALL MPI_IRECV(ibuf, 1000_4, MPI_REAL, 0, tag, MPI_COMM_WORLD, req(1,2), ierr)
PAUSE
end
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2-2. The screen output is as follows:
Tag_UB= 1681915906 536870911
Pass ...
Tag_UB= 1681915906 536870912
Fatal error in MPI_Irecv: Invalid tag, error stack:
MPI_Irecv(165): MPI_Irecv(buf=0x6a4fc0, count=1000, MPI_REAL, src=0, tag=536870912, MPI_COMM_WORLD, request=0x6aec00) failed
MPI_Irecv(109): Invalid tag, value is 536870912