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 error in MPAS with AMD compiler on frontier #6949

Open
ndkeen opened this issue Jan 27, 2025 · 2 comments
Open

Build error in MPAS with AMD compiler on frontier #6949

ndkeen opened this issue Jan 27, 2025 · 2 comments

Comments

@ndkeen
Copy link
Contributor

ndkeen commented Jan 27, 2025

The test SMS.ne4pg2_oQU480.WCYCLXX2010.frontier-scream-gpu_craygnuamdgpu
fails to build on frontier.

/lustre/orion/cli115/proj-shared/noel/e3sm_scratch/c01-jan9/kc.ne256pg2_oRRS18to6v3.WCYCLXX2010.c01-jan9.2d.n032.sk/build/cmake-bld/core_ocean/analysis_members/mpas_ocn_okubo_weiss.f90:80:21:

   80 |          type(c_ptr), value       :: array
      |                     1
Error: Type name 'c_ptr' at (1) is ambiguous
/lustre/orion/cli115/proj-shared/noel/e3sm_scratch/c01-jan9/kc.ne256pg2_oRRS18to6v3.WCYCLXX2010.c01-jan9.2d.n032.sk/build/cmake-bld/core_ocean/analysis_members/mpas_ocn_okubo_weiss.f90:83:24:

   83 |          type(c_funptr), value    :: compare ! int (*compare)(const void*, const void*)
      |                        1
Error: Type name 'c_funptr' at (1) is ambiguous
/lustre/orion/cli115/proj-shared/noel/e3sm_scratch/c01-jan9/kc.ne256pg2_oRRS18to6v3.WCYCLXX2010.c01-jan9.2d.n032.sk/build/cmake-bld/core_ocean/analysis_members/mpas_ocn_okubo_weiss.f90:1152:87:

 1152 |       call qsort(c_loc(stats(1)), elemCount, elemSize, c_funloc(compareRealDescending))
      |                                                                                       1
Error: Type mismatch in argument 'array' at (1); passed TYPE(c_ptr) to REAL(4)
/lustre/orion/cli115/proj-shared/noel/e3sm_scratch/c01-jan9/kc.ne256pg2_oRRS18to6v3.WCYCLXX2010.c01-jan9.2d.n032.sk/build/cmake-bld/core_ocean/analysis_members/mpas_ocn_okubo_weiss.f90:1152:87:

 1152 |       call qsort(c_loc(stats(1)), elemCount, elemSize, c_funloc(compareRealDescending))
      |                                                                                       1
Error: Type mismatch in argument 'compare' at (1); passed TYPE(c_funptr) to REAL(4)
Target CMakeFiles/ocn.dir/__/__/core_ocean/analysis_members/mpas_ocn_okubo_weiss.f90.o built in 0.640616 seconds
make[2]: *** [mpas-framework/src/CMakeFiles/ocn.dir/build.make:3029: mpas-framework/src/CMakeFiles/ocn.dir/__/__/core_ocean/analysis_members/mpas_ocn_okubo_weiss.f90.o] Error 1
make[2]: Leaving directory '/lustre/orion/cli115/proj-shared/noel/e3sm_scratch/c01-jan9/kc.ne256pg2_oRRS18to6v3.WCYCLXX2010.c01-jan9.2d.n032.sk/build/cmake-bld'
make[1]: *** [CMakeFiles/Makefile2:1703: mpas-framework/src/CMakeFiles/ocn.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

I verified that the test builds with the cray compiler (very slowly)

SMS.ne4pg2_oQU480.WCYCLXX2010.frontier-scream-gpu_crayclang-scream

It also build with GNU compiler on pm-gpu

@trey-ornl
Copy link
Contributor

craygnuamdgpu also uses the Gnu compiler for Fortran. Maybe pm-gpu has a compiler option that craygnuamdgpu does not?
My guess is that there is a missing use iso_c_binding that one build assumes but the other does not.

@trey-ornl
Copy link
Contributor

Updated guess. craygnuamdgpu might need to add the Fortran option -std=f2003 or -std=f2008, so the import statement is supported correctly?

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