When I place every operation in the main program, Wtime returns the correct wall time. But if I wrap the lines in a subroutine, MPI_Wtime only returns 0. I’m wondering is it expected? I can send you a demo program to illustrate the issue if needed. Thanks in advance.
P.S. I can confirm that my variable is initialized using double-precision, and the operations between the two Wtime should take around 1 second.