CRTM-2.3.0 Installation Issue with gcc 6.3.0

Hello All,

I am trying to compile CRTM- 2.3.0 with “GCC- 6.3.0 compiler” and I am getting very strange error, it is giving error in this file “CRTM_CloudCover_Define.f90”

As I am able to compile successfully with intel compiler but unable to compile with GCC.

I am using this source code for compiling.

please find the attached link for your reference. “

Index of /jcsda/CRTM/CRTM_Latest_Release

Please find the error msg and log file for your reference.

Kindly help me to fix this issue , I will be very thankful to you all.

raj@master~/software/crtm/REL-2.3.0> make

cd libsrc && make all

make[1]: Entering directory ‘/home/raj/software/crtm/REL-2.3.0/libsrc’

gfortran -O3 -fimplicit-none -ffree-form -fno-second-underscore -frecord-marker=4 -funroll-loops -ggdb -Wall -Wconversion -std=f2008 -c CRTM_Aerosol_Define.f90

gfortran -O3 -fimplicit-none -ffree-form -fno-second-underscore -frecord-marker=4 -funroll-loops -ggdb -Wall -Wconversion -std=f2008 -c CRTM_Cloud_Define.f90

gfortran -O3 -fimplicit-none -ffree-form -fno-second-underscore -frecord-marker=4 -funroll-loops -ggdb -Wall -Wconversion -std=f2008 -c CRTM_Parameters.f90

gfortran -O3 -fimplicit-none -ffree-form -fno-second-underscore -frecord-marker=4 -funroll-loops -ggdb -Wall -Wconversion -std=f2008 -c CRTM_Atmosphere_Define.f90

gfortran -O3 -fimplicit-none -ffree-form -fno-second-underscore -frecord-marker=4 -funroll-loops -ggdb -Wall -Wconversion -std=f2008 -c CRTM_CloudCover_Define.f90

CRTM_CloudCover_Define.f90:1423:8:

 self         , &

    1

Error: INTENT(OUT) argument ‘self’ of pure procedure ‘create’ at (1) may not be polymorphic

CRTM_CloudCover_Define.f90:1355:36:

ELEMENTAL SUBROUTINE Destroy( self )

                                1

Error: INTENT(OUT) argument ‘self’ of pure procedure ‘destroy’ at (1) may not be polymorphic

CRTM_CloudCover_Define.f90:1478:8:

 self         , &

    1

Error: INTENT(OUT) argument ‘self’ of pure procedure ‘ivar_create’ at (1) may not be polymorphic

CRTM_CloudCover_Define.f90:1360:41:

ELEMENTAL SUBROUTINE iVar_Destroy( self )

                                     1

Error: INTENT(OUT) argument ‘self’ of pure procedure ‘ivar_destroy’ at (1) may not be polymorphic

make.rules:14: recipe for target ‘CRTM_CloudCover_Define.o’ failed

make[1]: *** [CRTM_CloudCover_Define.o] Error 1

make[1]: Leaving directory ‘/home/raj/software/crtm/REL-2.3.0/libsrc’

Makefile:17: recipe for target ‘all’ failed

make: *** [all] Error 2

Raj,

My understanding is this is a compiler version issue (particularly with regard to Fortran standards interpretation / uncertainty), and is (apparently) fixed in later versions of the compiler.

The quick solution is to remove the “PURE” from the procedures that it’s complaining about, and it should compile and run as normal.

Hello Benjamin,

As per your suggestion I have removed the “PURE” from CRTM_CloudCover_Define.f90, but i am getting same error.

Kindly suggest me do i need to use latest version of GCC Compiler for compiling this CRTM REL-2.3.0.

Could you please guide me do i need to remove the line “PURE” from all the file under “libsrc”

raj@elogin03:~/software/crtm/crtm_gcc/REL-2.3.0/libsrc> grep -Ril “PURE”
CRTM_Cloud_Define.f90
MWwaterCoeff_Define.f90
ODPS_Predictor.f90
CRTM_Geometry_Define.f90
Zeeman_Input_Define.f90
CRTM_SfcOptics_Define.f90
CRTM_AtmOptics.f90
CRTM_IRlandCoeff.f90
CRTM_Interpolation.f90
test/check_crtm.fpp
CRTM_Options_Define.f90
CRTM_Aerosol_Define.f90
CRTM_RTSolution_Define.f90
CRTM_CloudCover_Define.f90
Azimuth_Emissivity_Module.f90
FitCoeff_Define.f90
MWwaterLUT_Define.f90
CRTM_FastemX.f90
Sort_Utility.f90
ODZeeman_AtmAbsorption.f90
CRTM_Atmosphere_Define.f90
UnitTest_Define.f90
NESDIS_SEAICE_PHYEM_MODULE.f90
CRTM_AtmOptics_Define.f90
SSU_Input_Define.f90
CRTM_GeometryInfo_Define.f90
CRTM_ChannelInfo_Define.f90
CRTM_SensorData_Define.f90
CRTM_SfcOptics.f90
CRTM_Surface_Define.f90
SEcategory_Define.f90

gfortran -fconvert=big-endian -O3 -fimplicit-none -ffree-form -fno-second-underscore -frecord-marker=4 -funroll-loops -ggdb -Wall -Wconversion -std=f2008 -c CRTM_Atmosphere_Define.f90
gfortran -fconvert=big-endian -O3 -fimplicit-none -ffree-form -fno-second-underscore -frecord-marker=4 -funroll-loops -ggdb -Wall -Wconversion -std=f2008 -c CRTM_CloudCover_Define.f90
CRTM_CloudCover_Define.f90:1423:8:

 self         , &
    1

Error: INTENT(OUT) argument ‘self’ of pure procedure ‘create’ at (1) may not be polymorphic
CRTM_CloudCover_Define.f90:1355:36:

ELEMENTAL SUBROUTINE Destroy( self )
1
Error: INTENT(OUT) argument ‘self’ of pure procedure ‘destroy’ at (1) may not be polymorphic
CRTM_CloudCover_Define.f90:1478:8:

 self         , &
    1

Error: INTENT(OUT) argument ‘self’ of pure procedure ‘ivar_create’ at (1) may not be polymorphic
CRTM_CloudCover_Define.f90:1360:41:

ELEMENTAL SUBROUTINE iVar_Destroy( self )
1
Error: INTENT(OUT) argument ‘self’ of pure procedure ‘ivar_destroy’ at (1) may not be polymorphic
make.rules:14: recipe for target ‘CRTM_CloudCover_Define.o’ failed
make: *** [CRTM_CloudCover_Define.o] Error 1

Hello Benjamin,

Kindly suggest me how to generate lib file of “libcrtm.so” dynamic. while compiling CRTM-2.2.3 with gcc or with intel lib are not generate with .so

when i am compiling any lower version of CRTM-2.2.3 with gcc, the library is generating with libcrtm.a
Kindly suggest me what should i mention while running below commands to generate “.so”, So that i will help me to compile with CRTM_TUTORIAL.

$ ./configure --prefix=/home/raj/codes/gcc_new/crtm-2.3.0

raj@elogin03:~/codes/gcc_new/crtm-2.2.0/crtm_v2.2.2/lib> ls
libcrtm.a

Hello,
I didn’t see that this issue was resolved, was it? I ask because I’m getting the same errors about polymorphic arguments when I compile CRTM v2.3.0 with GNU Fortran 8.5.0.

CRTM v2.4 resolves these errors.

If it’s the error I’m thinking of, You can fix it in version 2.3 yourself, just replace with what’s on the left arrow below with what’s on the right arrow.

Let me know if you still have problems

CRTM_CloudCover_Define.f90

1356c1356
< CLASS(CRTM_CloudCover_type), INTENT(OUT) :: self

Thanks, but I see only a left arrow, which is what is in the code now. Did the right arrow get left off or am I missing something?
Also, I did clone a copy of v2.4.0, but in the README there was a comment that it is a development version and is less user friendly-is that still the case?