derpycode / cgenie.muffin

MIT License
35 stars 25 forks source link

`genie.F` won't compile with `ifort`, thows `error #6366` #254

Closed tlangfor closed 2 weeks ago

tlangfor commented 3 weeks ago

I have been working to compile cgenie.muffin for sometime and no matter what I do I get the following error:

genie.F(333): error #6366: The shapes of the array expressions do not conform.
                  latent_ocn=latent_ocn+surf_latent_atm
---------------------------------------^
genie.F(334): error #6366: The shapes of the array expressions do not conform.
                  sensible_ocn=sensible_ocn+surf_sensible_atm
-------------------------------------------^
genie.F(335): error #6366: The shapes of the array expressions do not conform.
                  netsolar_ocn=netsolar_ocn+netsolar_atm
-------------------------------------------^
genie.F(336): error #6366: The shapes of the array expressions do not conform.
                  netlong_ocn=netlong_ocn+netlong_atm
-----------------------------------------^
genie.F(339): error #6366: The shapes of the array expressions do not conform.
                  evap_ocn=evap_ocn+evap_atm
-----------------------------------^
genie.F(340): error #6366: The shapes of the array expressions do not conform.
                  precip_ocn=precip_ocn+precip_atm
---------------------------------------^
genie.F(341): error #6366: The shapes of the array expressions do not conform.
                  runoff_ocn=runoff_ocn+land_runoff_atm
---------------------------------------^
genie.F(342): error #6366: The shapes of the array expressions do not conform.
                  ocean_stressx2_ocn=ocean_stressx2_ocn+surf_stressx2_atm
-------------------------------------------------------^
genie.F(343): error #6366: The shapes of the array expressions do not conform.
                  ocean_stressy2_ocn=ocean_stressy2_ocn+surf_stressy2_atm
-------------------------------------------------------^
genie.F(344): error #6366: The shapes of the array expressions do not conform.
                  ocean_stressx3_ocn=ocean_stressx3_ocn+surf_stressx3_atm
-------------------------------------------------------^
genie.F(345): error #6366: The shapes of the array expressions do not conform.
                  ocean_stressy3_ocn=ocean_stressy3_ocn+surf_stressy3_atm
-------------------------------------------------------^
genie.F(346): error #6366: The shapes of the array expressions do not conform.
                  go_solfor=go_solfor+solfor_atm
-------------------------------------^
genie.F(375): error #6366: The shapes of the array expressions do not conform.
                  insolar_sic=insolar_sic+insolar_atm
-----------------------------------------^
genie.F(376): error #6366: The shapes of the array expressions do not conform.
                  inlong_sic=inlong_sic+inlong_atm
---------------------------------------^
genie.F(377): error #6366: The shapes of the array expressions do not conform.
                  netheat_sic=netheat_sic+netheat_atm
-----------------------------------------^
genie.F(378): error #6366: The shapes of the array expressions do not conform.
                  surft_atm_sic=surft_atm_sic+surft_atm
---------------------------------------------^
genie.F(379): error #6366: The shapes of the array expressions do not conform.
                  surfq_atm_sic=surfq_atm_sic+surfq_atm
---------------------------------------------^
genie.F(380): error #6366: The shapes of the array expressions do not conform.
                  surfp_atm_sic=surfp_atm_sic+surfp_atm
---------------------------------------------^
genie.F(381): error #6366: The shapes of the array expressions do not conform.
                  surf_windspeed_sic=surf_windspeed_sic+surf_windspeed_atm
-------------------------------------------------------^

I've tried building with two versions of ifort:

ifort (IFORT) 18.0.1 20171018
- and -
ifort (IFORT) 19.1.3.304 20200925

but both fail at the same spot.

derpycode commented 3 weeks ago

I am a hungry data hippo and need more info ... Are you running make testbiogem? or is this a specific experiment (then I need at the minimum the base-config and user-config). (I do not have the Intel compiler and so cannot debug directly.)

derpycode commented 3 weeks ago

In whatever experiment you are trying to run, even if you are not using the PLASIM GCM atmosphere, the grid dimensions of the ocean and atmosphere are different. Try adding at line 310 of genie.F: print*,ilat1_ocn,ilat1_atm If somehow the default dimensions have not been changed, you might see: 36 32 Regardless, I need to know something about the experiment you are running to get any further. For reference, the default grid dimensions are specified in cgenie.muffin\genie-main\src\xml-config\xml\definition.xml and map onto the atmosphere and ocean component grid dimensions:

GENIENX 64
  <macro handle="GENIENYOPTS" status="undefined">
    <identifier>GENIENY</identifier>
    <replacement>32</replacement>
  </macro>

...

GOLDSTEINNLONS 36
  <macro handle="GOLDSTEINNLATSOPTS" status="undefined">
    <identifier>GOLDSTEINNLATS</identifier>
    <replacement>36</replacement>
  </macro>
tlangfor commented 3 weeks ago

Thanks all, I'm new to this code base and had completely missed the testbiogem target that's required. (I'm an HPC facilitator building it for researchers that I support).

I'm able to build the testbiogem case, though it's failing at the end when running. I have more work to do to understand why that might be happening. I'm using newish versions of netCDF (4.7.4)/netCDF-Fortran (4.5.3) which may be the issue:

STARTING EXPERIMENT:
Thu Aug 22 18:46:45 EDT 2024

 *******************************************************
  *** Welcome to cGENIE -- version:    0
 *******************************************************

 =======================================================
  >>> Initialising GOLDSTEIN ocean module ...
  <<< Initialisation complete
 =======================================================
 =======================================================
  >>> Initialising EMBM atmosphere module ...
  <<< Initialisation complete
 =======================================================
 =======================================================
  >>> Initialising sea-ice module ...
  <<< Initialisation complete
 =======================================================
 =======================================================
  >>> Initialising GEM geochemistry module ...
  <<< Initialisation complete
 =======================================================
 =======================================================
  >>> Initialising BIOGEM ocean biogeochem. module ...

 *** WARNING ***
  -> Originating location in code [module,subroutine]: biogem_data,sub_check_par
  -> ERROR MESSAGE: Particulate tracer CaCO3 does not have *all possible* corres
 ponding ocean tracers selected, e.g. Ca (BUT may not need them, esp. if involvi
 ng the Fe sytem ...)
  -> ERROR ACTION:  CONTINUING

  <<< Initialisation complete
 =======================================================
 =======================================================
  >>> Initialising ATCHEM atmospheric chem. module ...
  <<< Initialisation complete
 =======================================================

 *******************************************************
  *** Initialisation complete: simulation starting ...
 *******************************************************

      model year  * pCO2(uatm)   d13CO2  *  ice(%)   <SST>   <SSS>  *  <DIC>(uM)  <ALK>(uM)

 $N$        0.00       278.000   -6.500      0.000  -0.000  34.900      2244.000   2363.000
 >>> SAVING BIOGEM TIME-SERIES AVERAGE CENTERED @ year :        0.500
 $N$        1.00       279.916   -6.599      0.855   2.661  34.901      2241.531   2363.104
 >>> SAVING BIOGEM TIME-SERIES AVERAGE CENTERED @ year :        1.500
 $N$        2.00       279.502   -6.581      3.604   4.640  34.900      2240.350   2363.125
 >>> SAVING BIOGEM TIME-SERIES AVERAGE CENTERED @ year :        2.500
 $N$        3.00       279.246   -6.569      5.355   6.200  34.900      2239.464   2363.145
 >>> SAVING BIOGEM TIME-SERIES AVERAGE CENTERED @ year :        3.500
 $N$        4.00       279.061   -6.560      5.739   7.375  34.900      2238.742   2363.166
  error in netcdf           22
 Invalid argument

1

real    0m10.235s
user    0m6.613s
sys 0m0.201s

I'm happy to mark this issue closed and take this offline. Thanks so much for your help!

derpycode commented 2 weeks ago

yes ... please email directly ... also branch master.python3 has simplified netCDF and see muffin3.install.Ubuntu.pdf in the muffindoc repo ...