AER-RC / LBLRTM

Line-By-Line Radiative Transfer Model by Atmospheric and Environmental Research
Other
87 stars 28 forks source link

GCC8 breaks LBLRTM/LNFL #9

Open sidersc opened 3 years ago

sidersc commented 3 years ago

Couldn't build on a fresh Ubuntu 20.04 install. Make errors about number of arguments not matching. Track this down to a new "feature" on GCC8 which now treats that as an error. Adding the flag -std=legacy to makefile.common on both LBLRTM and LNFL allowed them to build to completion.

Corrected sections in makefile.common should read:

##############################################################

linux using gfortran and double precision

##############################################################

linuxGNUdbl: ${MAKE} -f ${MAKEFILE} all P_TYPE=dbl FC_TYPE=gnu PLTFRM=linux \ FC=gfortran \ FCFLAG="-fdefault-integer-8 -fdefault-real-8 -frecord-marker=4 -std=legacy" \ UTIL_FILE=util_gfortran.f90

##############################################################

linux using gfortran and single precisions

##############################################################

linuxGNUsgl: ${MAKE} -f ${MAKEFILE} all P_TYPE=sgl FC_TYPE=gnu PLTFRM=linux \ FC=gfortran \ FCFLAG="-frecord-marker=4 -std=legacy" \ UTIL_FILE=util_gfortran.f90

pernak18 commented 3 years ago

thanks @sidersc ! we'll work this into our next release of the code

kslong commented 3 years ago

I have the same problem on OSX running gfortran 9.3.0, but the fix suggested does not work there for reasons which are unclear to me.

On linux the suggestions above worked to eliminate the first problem, but I get compile errors:

The executable will be:
../lblrtm_v12.11_linux_intel_dbl

make in progress ...

../src/lblrtm.f90(5187): error #5082: Syntax error, found '//' when expecting one of: <END-OF-STATEMENT> ;
     &                //'SUM EXCEEDS SUM OF HITRAN RATIOS'
----------------------^
../src/lblrtm.f90(5186): error #6899: First non-blank character in a character type format specifier must be a left parenthesis.   ['ISOTPL_AMNT NOT PROPERLY SPECIFIED IN PATH]
                  STOP 'ISOTPL_AMNT NOT PROPERLY SPECIFIED IN PATH; ' &
------------------------^
compilation aborted for ../src/lblrtm.f90 (code 1)
make[1]: *** [lblrtm_v12.11_linux_intel_dbl.obj/lblrtm.o] Error 1
make: *** [linuxINTELdbl] Error 2

I am not a fortran expert, but the line did look quite odd. There it is compiling with gcc4.4.7

pernak18 commented 3 years ago

@kslong your standard error confuses me. it looks like you're compiling with ifort, no? still a build error, nonetheless. we'll take a look.

@kcadyper @inpolonsky can we address this error before tagging the new release? please and thanks

aayushgambhir21 commented 2 years ago

I have the same problem on OSX running gfortran 9.3.0, but the fix suggested does not work there for reasons which are unclear to me.

On linux the suggestions above worked to eliminate the first problem, but I get compile errors:

The executable will be:
../lblrtm_v12.11_linux_intel_dbl

make in progress ...

../src/lblrtm.f90(5187): error #5082: Syntax error, found '//' when expecting one of: <END-OF-STATEMENT> ;
     &                //'SUM EXCEEDS SUM OF HITRAN RATIOS'
----------------------^
../src/lblrtm.f90(5186): error #6899: First non-blank character in a character type format specifier must be a left parenthesis.   ['ISOTPL_AMNT NOT PROPERLY SPECIFIED IN PATH]
                  STOP 'ISOTPL_AMNT NOT PROPERLY SPECIFIED IN PATH; ' &
------------------------^
compilation aborted for ../src/lblrtm.f90 (code 1)
make[1]: *** [lblrtm_v12.11_linux_intel_dbl.obj/lblrtm.o] Error 1
make: *** [linuxINTELdbl] Error 2

I am not a fortran expert, but the line did look quite odd. There it is compiling with gcc4.4.7

Were you able to find sort of a fix to make it work on Mac laptop?