NoahMP _ Problems compiling with MAX_SOIL_LEVELS
(cd Utility_routines; make)
make[1]: Entering directory `/home/HRLDAS/src/HRLDAS-v3.6/Utility_routines' rm -f module_date_utilities.f cpp -C -P -traditional -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ module_date_utilities.F > module_date_utilities.f gfortran -o module_date_utilities.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_date_utilities.f rm -f module_model_constants.f cpp -C -P -traditional -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ module_model_constants.F > module_model_constants.f gfortran -o module_model_constants.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_model_constants.f rm -f module_wrf_utilities.f cpp -C -P -traditional -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ module_wrf_utilities.F > module_wrf_utilities.f gfortran -o module_wrf_utilities.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_wrf_utilities.f rm -f kwm_string_utilities.f cpp -C -P -traditional -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ kwm_string_utilities.F > kwm_string_utilities.f gfortran -o kwm_string_utilities.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none kwm_string_utilities.f make[1]: Leaving directory `/home/HRLDAS/src/HRLDAS-v3.6/Utility_routines' (cd Noah; make) make[1]: Entering directory `/home/HRLDAS/src/HRLDAS-v3.6/Noah' rm -f module_sf_myjsfc.f cpp -C -P -traditional -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ module_sf_myjsfc.F > module_sf_myjsfc.f gfortran -o module_sf_myjsfc.o -c -I. -I../Utility_routines -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_sf_myjsfc.f rm -f module_sf_sfclay.f cpp -C -P -traditional -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ module_sf_sfclay.F > module_sf_sfclay.f gfortran -o module_sf_sfclay.o -c -I. -I../Utility_routines -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_sf_sfclay.f rm -f module_sf_noahmplsm.f cpp -C -P -traditional -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ module_sf_noahmplsm.F > module_sf_noahmplsm.f gfortran -o module_sf_noahmplsm.o -c -I. -I../Utility_routines -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_sf_noahmplsm.f rm -f module_sf_noahmp_glacier.f cpp -C -P -traditional -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ module_sf_noahmp_glacier.F > module_sf_noahmp_glacier.f gfortran -o module_sf_noahmp_glacier.o -c -I. -I../Utility_routines -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_sf_noahmp_glacier.f rm -f module_sf_noahmp_groundwater.f cpp -C -P -traditional -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ module_sf_noahmp_groundwater.F > module_sf_noahmp_groundwater.f gfortran -o module_sf_noahmp_groundwater.o -c -I. -I../Utility_routines -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_sf_noahmp_groundwater.f rm -f module_sf_noahmpdrv.f cpp -C -P -traditional -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ module_sf_noahmpdrv.F > module_sf_noahmpdrv.f gfortran -o module_sf_noahmpdrv.o -c -I. -I../Utility_routines -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_sf_noahmpdrv.f make[1]: Leaving directory `/home/HRLDAS/src/HRLDAS-v3.6/Noah' (cd IO_code; make) make[1]: Entering directory `/home/HRLDAS/src/HRLDAS-v3.6/IO_code' rm -f module_hrldas_netcdf_io.f cpp -C -P -traditional -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ module_hrldas_netcdf_io.F > module_hrldas_netcdf_io.f gfortran -o module_hrldas_netcdf_io.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none -I../Utility_routines -I/home/HRLDAS/LIBRARIES/netcdf/include module_hrldas_netcdf_io.f rm -f module_NoahMP_hrldas_driver.f cpp -C -P -traditional -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ module_NoahMP_hrldas_driver.F > module_NoahMP_hrldas_driver.f gfortran -o module_NoahMP_hrldas_driver.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none -I. \ -I../Noah -I../Utility_routines -I/home/HRLDAS/LIBRARIES/netcdf/include module_NoahMP_hrldas_driver.f module_NoahMP_hrldas_driver.f:334.18: REAL, DIMENSION(MAX_SOIL_LEVELS) :: soil_thick_input ! depth to soil in 1 Error: Expression at (1) must be of INTEGER type, found REAL module_NoahMP_hrldas_driver.f:334.18: REAL, DIMENSION(MAX_SOIL_LEVELS) :: soil_thick_input ! depth to soil in 1 Error: Expression at (1) must be of INTEGER type, found REAL module_NoahMP_hrldas_driver.f:334.54: REAL, DIMENSION(MAX_SOIL_LEVELS) :: soil_thick_input ! depth to soil in 1 Error: The module or main program array 'soil_thick_input' at (1) must have constant shape make[1]: *** [module_NoahMP_hrldas_driver.o] Error 1 make[1]: Leaving directory `/home/HRLDAS/src/HRLDAS-v3.6/IO_code' make: *** [all] Error 2 |
Somehow, the issue you opened in HRLDAS repo on GitHub includes more info than your post here.
Perhaps the version of gfortran in Ubuntu 20.04 enforces some restrictions that weren't in place previously. Try to compile with -std=legacy. One thing I noticed is the affected code line in your post above is #334 and in the compiler output from the GitHub issue #31 it is line #341, whereas the relevant code line in the git repository is #565. Looks like you're compiling an older version. Try checking out the latest git snapshot, maybe your issue is already fixed there. And if everything else fails try replacing the constant MAX_SOIL_LEVELS with its value in the code: Code:
REAL, DIMENSION(10) :: soil_thick_input |
New issues regarding HRLDAS
Hi shruggy:
I tried what you suggested me. First comment, did not change any result Regarding isntalling new version, now I'm having new outputs as follows: Code:
mishel@mishel-VirtualBox:~/HRLDAS/HRLDAS$ make DO you have any guess what this is happening? THanks in advance for your help. Cheers, Mishel |
Remove the -C option from the cpp command line. You want C-style comments to be discarded, not to be passed through to the Fortran compiler.
|
I did that. AWesome!
But I'm still having issues. Those are my outputs so far: Code:
(cd Utility_routines; make) |
Undefined references usually mean a library is missing. See this issue though. The solution is to delete the -fno-underscoring in user_build_options.
|
Quote:
|
But still what? You have the same issue? Or something different? Ubuntu 20.04 ships with four versions of gfortran:
Code:
$ aptitude -F%p search '~Pfortran95-compiler~rnative' |
All times are GMT -5. The time now is 06:34 AM. |