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

Standalone MPAS-Ocean can't be built with craygnu on Frontier #7060

Open
xylar opened this issue Feb 26, 2025 · 3 comments · May be fixed by #7064
Open

Standalone MPAS-Ocean can't be built with craygnu on Frontier #7060

xylar opened this issue Feb 26, 2025 · 3 comments · May be fixed by #7064
Assignees
Labels
bug MPAS-Ocean standalone Issues and features for standalone MPAS-Ocean code that dont impact E3SM.

Comments

@xylar
Copy link
Contributor

xylar commented Feb 26, 2025

We're getting:

mpas_ocn_okubo_weiss.F:74:21:

   74 |          type(c_ptr), value       :: array
      |                     1
Error: Type name ‘c_ptr’ at (1) is ambiguous
mpas_ocn_okubo_weiss.F:77:24:

   77 |          type(c_funptr), value    :: compare ! int (*compare)(const void*, const void*)
      |                        1
Error: Type name ‘c_funptr’ at (1) is ambiguous
mpas_ocn_okubo_weiss.F:1159:87:

 1159 | (c_loc(stats(1)), elemCount, elemSize, c_funloc(compareRealDescending))
      |                                                                       1

Error: Type mismatch in argument ‘array’ at (1); passed TYPE(c_ptr) to REAL(8)
mpas_ocn_okubo_weiss.F:1159:87:

 1159 | (c_loc(stats(1)), elemCount, elemSize, c_funloc(compareRealDescending))
      |                                                                       1

Error: Type mismatch in argument ‘compare’ at (1); passed TYPE(c_funptr) to REAL(8)
make[3]: *** [Makefile:56: mpas_ocn_okubo_weiss.o] Error 1
make[3]: Leaving directory '/autofs/nccs-svm1_home1/xylar/e3sm_work/polaris/update-to-0.6.0-alpha.1/e3sm_submodules/e3sm_craygnu/components/mpas-ocean/src/analysis_members'
make[2]: *** [Makefile:145: analysis_members] Error 2
make[2]: Leaving directory '/autofs/nccs-svm1_home1/xylar/e3sm_work/polaris/update-to-0.6.0-alpha.1/e3sm_submodules/e3sm_craygnu/components/mpas-ocean/src'
make[1]: *** [Makefile:1011: dycore] Error 2
make[1]: Leaving directory '/autofs/nccs-svm1_home1/xylar/e3sm_work/polaris/update-to-0.6.0-alpha.1/e3sm_submodules/e3sm_craygnu/components/mpas-ocean'
make: *** [Makefile:381: gnu-cray] Error 2
@xylar xylar added bug MPAS-Ocean standalone Issues and features for standalone MPAS-Ocean code that dont impact E3SM. labels Feb 26, 2025
@xylar
Copy link
Contributor Author

xylar commented Feb 26, 2025

Same issue as #6688, I think.

@xylar
Copy link
Contributor Author

xylar commented Feb 26, 2025

@xylar
Copy link
Contributor Author

xylar commented Feb 26, 2025

The fix seems easy:

--- a/components/mpas-ocean/src/analysis_members/mpas_ocn_okubo_weiss.F
+++ b/components/mpas-ocean/src/analysis_members/mpas_ocn_okubo_weiss.F
@@ -30,7 +30,6 @@ module ocn_okubo_weiss
    use ocn_config
    use ocn_diagnostics_variables
    use mpas_matrix_operations
-   use iso_c_binding
 
    implicit none
    private
@@ -70,6 +69,7 @@ module ocn_okubo_weiss
 
    interface
       subroutine qsort(array, elem_count, elem_size, compare) bind(C, name="qsort")!{{{
+         use iso_c_binding, only: c_ptr, c_size_t, c_funptr
          import
          type(c_ptr), value       :: array
          integer(c_size_t), value :: elem_count

I will make a PR as soon as I can.

I was able to build with this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug MPAS-Ocean standalone Issues and features for standalone MPAS-Ocean code that dont impact E3SM.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants