Closed mark-petersen closed 6 years ago
Here is the diff that fixed it. Thanks to @harinitya for the details. I don't have time to fix today, will need to go on my to-do list.
diff --git a/src/framework/mpas_stream_manager.F b/src/framework/mpas_stream_manager.F
index cc96e77..292dc4d 100644
--- a/src/framework/mpas_stream_manager.F
+++ b/src/framework/mpas_stream_manager.F
@@ -1,5 +1,12 @@
module mpas_stream_manager
+!Added by Nitya - it gave an error of MPI_COMM_SELF not found without it
+#ifdef _MPI
+#ifndef NOMPIMOD
+ use mpi
+#endif
+#endif
+
#define COMMA ,
#define STREAM_DEBUG_WRITE(M) ! call mpas_log_write(M)
#define STREAM_WARNING_WRITE(M) call mpas_log_write( M , messageType=MPAS_LOG_WARN)
It looks like the only routine in mpas_stream_manager.F that references MPI_COMM_SELF is MPAS_stream_mgr_block_write, where we had added this line:
use mpas_dmpar, only : MPI_COMM_SELF
To ensure that the mpas_dmpar module would always have MPI_COMM_SELF defined, we have these lines:
#ifdef _MPI
public :: MPI_COMM_SELF
#else
integer, parameter, public :: MPI_COMM_SELF = 0
#endif
Which branch or version of the code is @harinitya working with?
Hi,
I am working with git hash gb5b733a, MPAS v5.1, so I guess it’s pretty old?
Thanks
Nitya
@harinitya I can't find this hash using git log
. Can you try:
git log --graph --oneline -n 8
and show us the output?
@harinitya The changes that I mentioned were introduced in MPAS v5.2, so that may explain why you're seeing issues with MPI_COMM_SELF in your branch.
@mark-petersen - Sorry the git hash is b5b733a. Here's the output
@mgduda - Thanks, that explains it.
@mark-petersen and @harinitya Since this issue no longer exists in the current develop
branch, shall we close this issue?
@mgduda - Yes please thanks.
The code has a bug in mpas_stream_manager.F, wherein compiling with USE_PIO2=true gives an error that MPI_COMM_SELF is not defined. We had to add the ‘use mpi’ statement to get it to compile.