Open Youwei-Ma opened 1 year ago
The MP_Type function at line 761 is an odd one. It's using Fortran90 explicit interfaces to return the MPI datatype of the argument so it doesn't need to have an assigned value. Intel, nvidia, gnu and cray compilers all work with it.
Try adding this line right before line 761
ztbf(0,0,0)=0.0
Thanks for your response. I added this line and rebuild but the error still there unless I delete the -r8
equivalent compiler flag.
I also tried to directly set mp_Type_ztbf= 17
in line 761 (indicate MPI_DOUBLE_PRECISION), it can also compile m_zeit.F90 but gives me another error in m_AttrVect.F90:
jwd2520i-s "/lustre/home/yomma/CESM/libraries/mct/mct/m_AttrVect.F90", line 3531, column 13: Generic procedure reference must be unambiguous for 'IndexSort'. jwd2520i-s "/lustre/home/yomma/CESM/libraries/mct/mct/mAttrVect.F90", line 3534, column 13: Generic procedure reference must be unambiguous for 'IndexSort'. Module subprogram name(Permute) jwd2520i-s "/lustre/home/yomma/CESM/libraries/mct/mct/mAttrVect.F90", line 3627, column 10: Generic procedure reference must be unambiguous for 'Permute'. Module subprogram name(Unpermute) jwd2520i-s "/lustre/home/yomma/CESM/libraries/mct/mct/m_AttrVect.F90", line 3712, column 10: Generic procedure reference must be unambiguous for 'Unpermute'. gmake[1]: *** [Makefile:62: m_AttrVect.o] Error 1
Then I check the code again and found
For interface MP_type
in m_mpif90.F90: https://github.com/MCSclimate/MCT/blob/e36024c5ddf482625ae6bd9474eff7d8f393f87c/mpeu/m_mpif90.F90#L142C1-L142C1
All these variables are declared as integer.
Why do we declare ztbf in m_zeit.F90, line 752 as real**8? Thanks.
On the process of compiling CESM using Fujitsu compiler, an error says
Fortran diagnostic messages: program name(m_zeit) Module subprogram name(allflush_) jwd2520i-s "/lustre/home/yomma/CESM/libraries/mct/mpeu/m_zeit.F90", line 761, column 16: Generic procedure reference must be unambiguous for 'MP_type'. gmake[1]: *** [Makefile:71: m_zeit.o] Error 1 gmake: *** [/lustre/home/yomma/CESM/libraries/mct/Makefile:10: subdirs] Error 2
In m_zeit.F90, line 752 declares
ztbf
and then line 761 accesses the array without having anything assigned to it. I am not sure how other fortran compilers deal with this undefined value.tag = MCT_2.11.0