Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fails using Fujitsu compiler #74

Open
Youwei-Ma opened this issue Nov 14, 2023 · 2 comments
Open

build fails using Fujitsu compiler #74

Youwei-Ma opened this issue Nov 14, 2023 · 2 comments

Comments

@Youwei-Ma
Copy link

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

@rljacob
Copy link
Contributor

rljacob commented Nov 16, 2023

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

@Youwei-Ma
Copy link
Author

Youwei-Ma commented Nov 17, 2023

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/m_AttrVect.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/m_AttrVect.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants