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

Compilation error in Ferrier-Aligo microphysics #1074

Open
mkavulich opened this issue May 30, 2024 · 2 comments
Open

Compilation error in Ferrier-Aligo microphysics #1074

mkavulich opened this issue May 30, 2024 · 2 comments
Labels

Comments

@mkavulich
Copy link
Collaborator

mkavulich commented May 30, 2024

Description

At some point in the past few months, compilation of Ferrier-Aligo microphysics was broken, unfortunately I don't have time to track down the exact hash. This was first noted in the Single-Column model when updating to the latest ccpp-physics hash, but I have confirmed this occurs in the ufs-weather-model as well, which suggests the problem is in the physics and not a specific host.

Steps to Reproduce

For SCM, the easiest way to replicate this is to attempt to compile with all SDFs:

> cmake -DCCPP_SUITES=ALL ../src 2>&1 | tee log.cmake
> make -j4 2>&1 | tee log.make
[  0%] Building Fortran object ccpp/framework/src/CMakeFiles/ccpp_framework.dir/ccpp_types.F90.o
[  0%] Linking Fortran static library libccpp_framework.a
[  0%] Built target ccpp_framework
...
...
[ 26%] Building Fortran object ccpp/physics/CMakeFiles/ccpp_physics.dir/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_post.F90.o
[ 26%] Building Fortran object ccpp/physics/CMakeFiles/ccpp_physics.dir/physics/MP/Ferrier_Aligo/mp_fer_hires.F90.o
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/ccpp-scm/ccpp/physics/physics/MP/Ferrier_Aligo/mp_fer_hires.F90(90): error #6633: The type of the actual argument differs from the type of the dummy argument.   [MPICOMM]
       CALL FERRIER_INIT_HR(dtp,mpicomm,mpirank,mpiroot,threads,errmsg,errflg)
--------------------------------^
compilation aborted for /scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/ccpp-scm/ccpp/physics/physics/MP/Ferrier_Aligo/mp_fer_hires.F90 (code 1)
make[2]: *** [ccpp/physics/CMakeFiles/ccpp_physics.dir/build.make:1583: ccpp/physics/CMakeFiles/ccpp_physics.dir/physics/MP/Ferrier_Aligo/mp_fer_hires.F90.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:230: ccpp/physics/CMakeFiles/ccpp_physics.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

NOTE: A different error occurs if you attempt to compile with just a single suite with FA, which suggests there may be multiple issues involved. See "Output" section for full details

Additional Context

I first ran into this error on Hera with Intel, but also replicated it with MacOS clang compilers. It's likely this affects all compilers/platforms

Output

Full set of errors when attempting to compile with HAFS_v0_hwrf:

> cmake -DCCPP_SUITES=HAFS_v0_hwrf ../src 2>&1 | tee log.cmake
> make -j4 2>&1 | tee log.make
[  0%] Building Fortran object ccpp/framework/src/CMakeFiles/ccpp_framework.dir/ccpp_types.F90.o
[  1%] Linking Fortran static library libccpp_framework.a
[  1%] Built target ccpp_framework
...
...
[ 15%] Building Fortran object ccpp/physics/CMakeFiles/ccpp_physics.dir/physics/Radiation/radiation_astronomy.f.o
[ 15%] Building Fortran object ccpp/physics/CMakeFiles/ccpp_physics.dir/physics/Radiation/radiation_cloud_overlap.F90.o
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(64): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [MODULE_MP_RADAR]
      USE module_mp_radar
----------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(925): error #6404: This name does not have a type, and must have an explicit type.   [XAM_R]
      xam_r = am_r
------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(926): error #6404: This name does not have a type, and must have an explicit type.   [XBM_R]
      xbm_r = bm_r
------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(927): error #6404: This name does not have a type, and must have an explicit type.   [XMU_R]
      xmu_r = mu_r
------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(928): error #6404: This name does not have a type, and must have an explicit type.   [XAM_S]
      xam_s = am_s
------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(929): error #6404: This name does not have a type, and must have an explicit type.   [XBM_S]
      xbm_s = bm_s
------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(930): error #6404: This name does not have a type, and must have an explicit type.   [XMU_S]
      xmu_s = mu_s
------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(931): error #6404: This name does not have a type, and must have an explicit type.   [XAM_G]
      xam_g = am_g
------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(932): error #6404: This name does not have a type, and must have an explicit type.   [XBM_G]
      xbm_g = bm_g
------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(933): error #6404: This name does not have a type, and must have an explicit type.   [XMU_G]
      xmu_g = mu_g
------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6139): error #6404: This name does not have a type, and must have an explicit type.   [NRBINS]
           do n = 1, nrbins
---------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6140): error #6404: This name does not have a type, and must have an explicit type.   [XXDS]
              x = am_s * xxDs(n)**bm_s
-------------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6142): error #6404: This name does not have a type, and must have an explicit type.   [MELT_OUTSIDE_S]
     &              fmelt_s, melt_outside_s, m_w_0, m_i_0, lamda_radar, &
-----------------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6142): error #6404: This name does not have a type, and must have an explicit type.   [M_W_0]
     &              fmelt_s, melt_outside_s, m_w_0, m_i_0, lamda_radar, &
---------------------------------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6142): error #6404: This name does not have a type, and must have an explicit type.   [M_I_0]
     &              fmelt_s, melt_outside_s, m_w_0, m_i_0, lamda_radar, &
----------------------------------------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6142): error #6404: This name does not have a type, and must have an explicit type.   [LAMDA_RADAR]
     &              fmelt_s, melt_outside_s, m_w_0, m_i_0, lamda_radar, &
-----------------------------------------------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6143): error #6404: This name does not have a type, and must have an explicit type.   [MIXINGRULESTRING_S]
     &              CBACK, mixingrulestring_s, matrixstring_s,          &
---------------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6143): error #6404: This name does not have a type, and must have an explicit type.   [MATRIXSTRING_S]
     &              CBACK, mixingrulestring_s, matrixstring_s,          &
-----------------------------------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6144): error #6404: This name does not have a type, and must have an explicit type.   [INCLUSIONSTRING_S]
     &              inclusionstring_s, hoststring_s,                    &
--------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6144): error #6404: This name does not have a type, and must have an explicit type.   [HOSTSTRING_S]
     &              inclusionstring_s, hoststring_s,                    &
---------------------------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6145): error #6404: This name does not have a type, and must have an explicit type.   [HOSTMATRIXSTRING_S]
     &              hostmatrixstring_s, hostinclusionstring_s)
--------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6145): error #6404: This name does not have a type, and must have an explicit type.   [HOSTINCLUSIONSTRING_S]
     &              hostmatrixstring_s, hostinclusionstring_s)
----------------------------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6148): error #6404: This name does not have a type, and must have an explicit type.   [SIMPSON]
              eta = eta + f_d * CBACK * simpson(n) * xdts(n)
----------------------------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6148): error #6404: This name does not have a type, and must have an explicit type.   [XDTS]
              eta = eta + f_d * CBACK * simpson(n) * xdts(n)
-----------------------------------------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6150): error #6404: This name does not have a type, and must have an explicit type.   [LAMDA4]
           ze_snow(k) = SNGL(lamda4 / (pi5 * K_w) * eta)
-----------------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6150): error #6404: This name does not have a type, and must have an explicit type.   [PI5]
           ze_snow(k) = SNGL(lamda4 / (pi5 * K_w) * eta)
---------------------------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6150): error #6404: This name does not have a type, and must have an explicit type.   [K_W]
           ze_snow(k) = SNGL(lamda4 / (pi5 * K_w) * eta)
---------------------------------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6160): error #6404: This name does not have a type, and must have an explicit type.   [XXDG]
              x = am_g * xxDg(n)**bm_g
-------------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6162): error #6404: This name does not have a type, and must have an explicit type.   [MELT_OUTSIDE_G]
     &              fmelt_g, melt_outside_g, m_w_0, m_i_0, lamda_radar, &
-----------------------------^
/scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90(6163): error #6404: This name does not have a type, and must have an explicit type.   [MIXINGRULESTRING_G]
     &              CBACK, mixingrulestring_g, matrixstring_g,          &
---------------------------^
/tmp/ifortCWKQxg.i90(6523): catastrophic error: Too many errors, exiting
compilation aborted for /scratch1/BMC/hmtb/kavulich/CCPP/workdir/suite_names_update/PR_482/ccpp-scm/ccpp/physics/physics/MP/Thompson/module_mp_thompson.F90 (code 1)
make[2]: *** [ccpp/physics/CMakeFiles/ccpp_physics.dir/build.make:335: ccpp/physics/CMakeFiles/ccpp_physics.dir/physics/MP/Thompson/module_mp_thompson.F90.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:230: ccpp/physics/CMakeFiles/ccpp_physics.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
@mkavulich mkavulich added the bug label May 30, 2024
@grantfirl
Copy link
Collaborator

This is probably related to ufs-community#160. Should be an easy fix, I think.

@scrasmussen
Copy link
Member

scrasmussen commented Jun 2, 2024

This seems to be just an Intel issue on Derecho. I should point out that while this Github issue is for the Ferrier-Aligo microphysics issue I wasn't ever able to reproduce that error.

On Derecho I was able to successfully build all the suites with the following:

  • the GNU compiler

and got the HAFS_v0_hwrf suite building with:

  • the Intel compiler ifort (IFORT) 2021.10.0 20230609 but only if the 'ccpp/physics/physics/MP/module_mp_radar.F90', line is added to VARIABLE_DEFINITION_FILES variable at ccpp_prebuild_config.py#16-31

That same trick didn't work for building all the suites with Intel. I'd get an Internal Compiler Error being reported in ccpp_static_api.F90:4661 at

ierr = SCM_GFS_v15p2_FA_radiation_run_cap(one=one,physics=physics,cdata=cdata,LTP=LTP,con_eps=con_eps,con_pi=con_pi, &
    con_rd=con_rd,con_g=con_g,con_ttp=con_ttp,con_thgni=con_thgni,con_epsm1=con_epsm1, &
    con_fvirt=con_fvirt,con_rog=con_rog,con_rocp=con_rocp)

Note: this was building with the old ifort compiler, which is-now or will-be-soon deprecated. This is weird since it is a different error than what Mike initially reported when building all the cases so maybe that is just an older ifort issue? I did try with the new ifx compiler but don't think the Derecho spack stack is set up for the new ifx since it was breaking at weird places.

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

No branches or pull requests

3 participants