HPSCTerrSys / eCLM

Fork of Community Land Model v5.0
https://hpscterrsys.github.io/eCLM/
Other
8 stars 13 forks source link

Build failure due to a circular dependency #19

Closed kvrigor closed 2 years ago

kvrigor commented 2 years ago

This bug was introduced by #17. CMake detects a circular dependency originating from BalanceCheckMod.F90 which leads to a compile error in clm_instMod.F90. I assume CMake is smart enough to avoid this, and yet we encounter this error.

[ 72%] Building Fortran object clm5/CMakeFiles/clm.dir/biogeophys/GlacierSurfaceMassBalanceMod.F90.o
gmake[2]: Circular clm5/CMakeFiles/clm.dir/main/clm_instMod.F90.o <- clm5/CMakeFiles/clm.dir/balancecheckmod.mod.stamp dependency dropped.
[ 72%] Building Fortran object clm5/CMakeFiles/clm.dir/main/initVerticalMod.F90.o
[ 72%] Building Fortran object clm5/CMakeFiles/clm.dir/main/lnd2glcMod.F90.o
[ 73%] Building Fortran object clm5/CMakeFiles/clm.dir/biogeophys/OzoneMod.F90.o
[ 73%] Building Fortran object clm5/CMakeFiles/clm.dir/biogeophys/OzoneOffMod.F90.o
[ 73%] Building Fortran object clm5/CMakeFiles/clm.dir/biogeophys/OzoneFactoryMod.F90.o
[ 74%] Building Fortran object clm5/CMakeFiles/clm.dir/main/organicFileMod.F90.o
[ 74%] Building Fortran object clm5/CMakeFiles/clm.dir/biogeophys/SoilHydrologyInitTimeConstMod.F90.o
[ 74%] Building Fortran object clm5/CMakeFiles/clm.dir/biogeophys/SoilStateInitTimeConstMod.F90.o
[ 74%] Building Fortran object clm5/CMakeFiles/clm.dir/biogeophys/SoilWaterRetentionCurveClappHornberg1978Mod.F90.o
../eCLM/src/clm5/biogeophys/SoilWaterRetentionCurveClappHornberg1978Mod.F90(35): warning #6178: The return value of this FUNCTION has not been defined.   [CONSTRUCTOR]
  type(soil_water_retention_curve_clapp_hornberg_1978_type) function constructor()
---------------------------------------------------------------------^
[ 74%] Building Fortran object clm5/CMakeFiles/clm.dir/biogeophys/SoilWaterRetentionCurveVanGenuchten1980Mod.F90.o
../eCLM/src/clm5/biogeophys/SoilWaterRetentionCurveVanGenuchten1980Mod.F90(35): warning #6178: The return value of this FUNCTION has not been defined.   [CONSTRUCTOR]
  type(soil_water_retention_curve_vangenuchten_1980_type) function constructor()
-------------------------------------------------------------------^
[ 75%] Building Fortran object clm5/CMakeFiles/clm.dir/biogeophys/SoilWaterRetentionCurveFactoryMod.F90.o
[ 75%] Building Fortran object clm5/CMakeFiles/clm.dir/biogeophys/SurfaceRadiationMod.F90.o
[ 75%] Building Fortran object clm5/CMakeFiles/clm.dir/biogeophys/UrbanTimeVarType.F90.o
[ 76%] Building Fortran object clm5/CMakeFiles/clm.dir/main/clm_instMod.F90.o
../eCLM/src/clm5/main/clm_instMod.F90(189): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [BALANCECHECKMOD]
    use BalanceCheckMod                    , only : GetBalanceCheckSkipSteps
--------^
../eclm/eCLM/src/clm5/main/clm_instMod.F90(395): error #6404: This name does not have a type, and must have an explicit type.   [GETBALANCECHECKSKIPSTEPS]
    call bgc_vegetation_inst%Init(bounds, nlfilename, GetBalanceCheckSkipSteps() )
------------------------------------------------------^
../eCLM/src/clm5/main/clm_instMod.F90(189): error #6580: Name in only-list does not exist or is not accessible.   [GETBALANCECHECKSKIPSTEPS]
    use BalanceCheckMod                    , only : GetBalanceCheckSkipSteps
----------------------------------------------------^
compilation aborted for ../eCLM/src/clm5/main/clm_instMod.F90 (code 1)
gmake[2]: *** [clm5/CMakeFiles/clm.dir/build.make:2859: clm5/CMakeFiles/clm.dir/main/clm_instMod.F90.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:342: clm5/CMakeFiles/clm.dir/all] Error 2