MPAS-Dev / MPAS

Repository for private MPAS development prior to the MPAS v6.0 release.
Other
4 stars 0 forks source link

Initialize threadLevel when mpi_comm is already initialized #1432

Closed amametjanov closed 6 years ago

amametjanov commented 6 years ago

This is needed for ACME runs, where MPI comm is passed in as a parameter. Intel17+debug runs show that threadLevel is uninitialized.

mark-petersen commented 6 years ago

Thanks @amametjanov. @matthewhoffman and @mgduda this is an obvious bug. In the case where mpi_comm is passed in and MPAS_OPENMP is defined, threadLevel is simply uninitialized, but then we print a message with it.

I did a quick local merge into develop and ocean develop, both compile with gnu and intel.

mark-petersen commented 6 years ago

@climbfuji could you give this a quick look? @mgduda may be out. FYI, I merged this PR into develop and compiled with CORE=atmosphere just to check.

climbfuji commented 6 years ago

To me this looks good. I gave it a quick test to compile and run (my standard atmosphere test) on my macbook. For the standalone atmosphere core, mpi_comm is not yet initialized, i.e. I can't test the bugfix itself, but just that it doesn't break anything else.

mgduda commented 6 years ago

Yes, I agree that this is an obvious bug.