# Unable to compiling crtm-tutorial with crtm-2.3.0 gcc

**URL:** <https://forums.jcsda.org/t/unable-to-compiling-crtm-tutorial-with-crtm-2-3-0-gcc/395>\
**Category:** Uncategorized\
**Created:** [October 3, 2022, 7:37am UTC](https://forums.jcsda.org/t/unable-to-compiling-crtm-tutorial-with-crtm-2-3-0-gcc/395 "2022-10-03T07:37:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajsharma](https://avatars.discourse-cdn.com/v4/letter/r/77aa72/32.png) [@Rajsharma](https://forums.jcsda.org/u/Rajsharma)\
**Post date:** [October 3, 2022, 7:37am UTC](https://forums.jcsda.org/t/unable-to-compiling-crtm-tutorial-with-crtm-2-3-0-gcc/395/1 "2022-10-03T07:37:21Z")

</div>

Hello StegmannJCSDA,

As per your suggestion i have compiled crtm-2.3.0 with gcc compiler successfully.

below is the module i have use for compiling: -

$ module load gnu/lib/hdf5/1.10.0 gnu/lib/netcdf\_c/4.6.0 gnu/lib/lapack\_netlib/3.8.0.

$ under lib directory this is the file generated.

ls /software/crtm/raj/crtm\_gcc/REL-2.3.0/codes/crtm\_v2.3.0/lib/ libcrtm.a ls /home/raj/software/crtm/raj/crtm\_gcc/REL-2.3.0/codes/crtm\_v2.3.0/include  
accoeff\_binary\_io.mod crtm\_irlandcoeff.mod datetime\_utility.mod odas\_binary\_io.mod  
accoeff\_define.mod crtm\_irsnowcoeff.mod ellison.mod odas\_define.mod  
ada\_module.mod crtm\_irssem.mod emission\_module.mod odas\_predictor.mod  
aerosolcoeff\_binary\_io.mod crtm\_irwatercoeff.mod endian\_utility.mod odas\_predictor\_define.mod  
aerosolcoeff\_define.mod crtm\_k\_matrix\_module.mod file\_utility.mod odas\_taucoeff.mod  
aovar\_define.mod crtm\_lifecycle.mod fitcoeff\_define.mod odps\_atmabsorption.mod  
asvar\_define.mod crtm\_lowfrequency\_mwssem.mod foam\_utility\_module.mod odps\_binary\_io.mod  
azimuth\_emissivity\_f6\_module.mod crtm\_model\_profiles.mod fresnel.mod odps\_coordinatemapping.mod  
azimuth\_emissivity\_module.mod crtm\_module.mod fundamental\_constants.mod odps\_define.mod  
binary\_file\_utility.mod crtm\_moleculescatter.mod guillou.mod odps\_predictor.mod  
cloudcoeff\_binary\_io.mod crtm\_mw\_ice\_sfcoptics.mod hyperbolic\_step.mod odps\_predictor\_define.mod  
cloudcoeff\_define.mod crtm\_mw\_land\_sfcoptics.mod iatm\_define.mod odps\_taucoeff.mod  
common\_rtsolution.mod crtm\_mw\_snow\_sfcoptics.mod irwatercoeff\_define.mod odssu\_atmabsorption.mod  
compare\_float\_numbers.mod crtm\_mw\_water\_sfcoptics.mod large\_scale\_correction\_module.mod odssu\_binary\_io.mod  
crtm\_adjoint\_module.mod crtm\_mwwatercoeff.mod liu.mod odssu\_define.mod  
crtm\_aerosol\_define.mod crtm\_nltecorrection.mod lseatlas\_define.mod odssu\_taucoeff.mod  
crtm\_aerosolcoeff.mod crtm\_options\_define.mod message\_handler.mod odzeeman\_atmabsorption.mod  
crtm\_aerosolscatter.mod crtm\_parameters.mod mwwatercoeff\_define.mod odzeeman\_predictor.mod  
crtm\_ancillaryinput\_define.mod crtm\_planck\_functions.mod mwwaterlut\_define.mod odzeeman\_taucoeff.mod  
crtm\_antennacorrection.mod crtm\_predictor.mod nesdis\_amsre\_siceem\_module.mod pafv\_define.mod  
crtm\_aod\_module.mod crtm\_predictor\_define.mod nesdis\_amsre\_snowem\_module.mod profile\_utility\_parameters.mod  
crtm\_atmabsorption.mod crtm\_rtsolution.mod nesdis\_amsu\_siceem\_module.mod reflection\_correction\_module.mod  
crtm\_atmoptics.mod crtm\_rtsolution\_define.mod nesdis\_amsu\_snowem\_module.mod rtv\_define.mod  
crtm\_atmoptics\_define.mod crtm\_secategory.mod nesdis\_atms\_seaice\_lib.mod search\_utility.mod  
crtm\_atmosphere.mod crtm\_sensordata\_define.mod nesdis\_atms\_seaice\_module.mod secategory\_define.mod  
crtm\_atmosphere\_define.mod crtm\_sensorinfo.mod nesdis\_atms\_snowem\_module.mod sensorinfo\_parameters.mod  
crtm\_channelinfo\_define.mod crtm\_sfcoptics.mod nesdis\_landem\_module.mod slope\_variance.mod  
crtm\_cloud\_define.mod crtm\_sfcoptics\_define.mod nesdis\_mhs\_siceem\_module.mod small\_scale\_correction\_module.mod  
crtm\_cloudcoeff.mod crtm\_spccoeff.mod nesdis\_mhs\_snowem\_module.mod soi\_module.mod  
crtm\_cloudcover\_define.mod crtm\_surface\_define.mod nesdis\_seaice\_phyem\_module.mod sort\_utility.mod  
crtm\_cloudscatter.mod crtm\_tangent\_linear\_module.mod nesdis\_snowem\_atms\_parameters.mod spccoeff\_binary\_io.mod  
crtm\_fastem1.mod crtm\_taucoeff.mod nesdis\_snowem\_parameters.mod spccoeff\_define.mod  
crtm\_fastemx.mod crtm\_utility.mod nesdis\_ssmi\_module.mod spectral\_units\_conversion.mod  
crtm\_forward\_module.mod crtm\_vis\_ice\_sfcoptics.mod nesdis\_ssmi\_siceem\_module.mod ssu\_input\_define.mod  
crtm\_geometry\_define.mod crtm\_vis\_land\_sfcoptics.mod nesdis\_ssmi\_snowem\_module.mod string\_utility.mod  
crtm\_geometryinfo.mod crtm\_vis\_snow\_sfcoptics.mod nesdis\_ssmis\_seaiceem\_module.mod subset\_define.mod  
crtm\_geometryinfo\_define.mod crtm\_vis\_water\_sfcoptics.mod nesdis\_ssmis\_snowem\_module.mod taucoeff\_define.mod  
crtm\_interpolation.mod crtm\_visicecoeff.mod nlte\_parameters.mod timing\_utility.mod  
crtm\_ir\_ice\_sfcoptics.mod crtm\_vislandcoeff.mod nlte\_predictor\_define.mod type\_kinds.mod  
crtm\_ir\_land\_sfcoptics.mod crtm\_vissnowcoeff.mod nlte\_predictor\_io.mod unittest\_define.mod  
crtm\_ir\_snow\_sfcoptics.mod crtm\_viswatercoeff.mod nltecoeff\_binary\_io.mod zeeman\_input\_define.mod  
crtm\_ir\_water\_sfcoptics.mod csvar\_define.mod nltecoeff\_define.mod zeeman\_utility.mod  
crtm\_iricecoeff.mod date\_utility.mod odas\_atmabsorption.mod

Note -: Now the problem is same with crtm-tutorial.  
Maybe you have bug with this version, please help me to fix this issue.  
I am trying to compile in CRAY HPC server

$ cd CRTM\_tutorial/  
raj@elogin03:~/software/crtm/raj/crtm\_gcc/CRTM\_tutorial\> ls  
K-Matrix\_SVD K-Matrix\_test LICENSE.txt NakajimaKing README.md doc  
raj@elogin03:~/software/crtm/raj/crtm\_gcc/CRTM\_tutorial\> cd K-Matrix\_test/  
raj@elogin03:~/software/crtm/raj/crtm\_gcc/CRTM\_tutorial/K-Matrix\_test\>cat makefile

all:  
gfortran -c -I/home/raj/software/crtm/raj/crtm\_gcc/REL-2.3.0/codes/crtm\_v2.3.0/include KMatrix\_test.f90  
gfortran -L/home/raj/software/crtm/raj/crtm\_gcc/REL-2.3.0/codes/crtm\_v2.3.0/lib/libcrtm.a -o K.x KMatrix\_test.o

clean:  
@rm \*.o \*.mod

raj@elogin03:~/software/crtm/raj/crtm\_gcc/CRTM\_tutorial/K-Matrix\_test\> make clean  
rm: cannot remove ‘\*.mod’: No such file or directory  
makefile:6: recipe for target ‘clean’ failed  
make: \*\*\* [clean] Error 1  
raj@elogin03:~/software/crtm/raj/crtm\_gcc/CRTM\_tutorial/K-Matrix\_test\> make  
gfortran -c -I/home/raj/software/crtm/raj/crtm\_gcc/REL-2.3.0/codes/crtm\_v2.3.0/include KMatrix\_test.f90  
gfortran -L/home/raj/software/crtm/raj/crtm\_gcc/REL-2.3.0/codes/crtm\_v2.3.0/lib/libcrtm.a -o K.x KMatrix\_test.o  
KMatrix\_test.o: In function `MAIN__': KMatrix_test.f90:(.text+0x1aca): undefined reference to `\_\_crtm\_module\_MOD\_crtm\_version’  
KMatrix\_test.f90:(.text+0x1b83): undefined reference to `__message_handler_MOD_program_message' KMatrix_test.f90:(.text+0x1eda): undefined reference to `\_\_crtm\_lifecycle\_MOD\_crtm\_init’  
KMatrix\_test.f90:(.text+0x1f9b): undefined reference to `__message_handler_MOD_display_message' KMatrix_test.f90:(.text+0x1fde): undefined reference to `\_\_crtm\_channelinfo\_define\_MOD\_crtm\_channelinfo\_n\_channels’  
KMatrix\_test.f90:(.text+0x4ab0): undefined reference to `__message_handler_MOD_display_message' KMatrix_test.f90:(.text+0x4b22): undefined reference to `\_\_crtm\_atmosphere\_define\_MOD\_crtm\_atmosphere\_create’  
KMatrix\_test.f90:(.text+0x4b59): undefined reference to `__crtm_atmosphere_define_MOD_crtm_atmosphere_associated' KMatrix_test.f90:(.text+0x4c43): undefined reference to `\_\_message\_handler\_MOD\_display\_message’  
KMatrix\_test.f90:(.text+0x4d15): undefined reference to `__crtm_atmosphere_define_MOD_crtm_atmosphere_create' KMatrix_test.f90:(.text+0x4db4): undefined reference to `\_\_crtm\_atmosphere\_define\_MOD\_crtm\_atmosphere\_associated’  
KMatrix\_test.f90:(.text+0x4ead): undefined reference to `__message_handler_MOD_display_message' KMatrix_test.f90:(.text+0x4f4f): undefined reference to `\_\_crtm\_geometry\_define\_MOD\_crtm\_geometry\_setvalue’  
KMatrix\_test.f90:(.text+0x4fdf): undefined reference to `__crtm_atmosphere_define_MOD_crtm_atmosphere_zero' KMatrix_test.f90:(.text+0x5069): undefined reference to `\_\_crtm\_surface\_define\_MOD\_crtm\_surface\_zero’  
KMatrix\_test.f90:(.text+0x537d): undefined reference to `__crtm_k_matrix_module_MOD_crtm_k_matrix' KMatrix_test.f90:(.text+0x543f): undefined reference to `\_\_message\_handler\_MOD\_display\_message’  
KMatrix\_test.f90:(.text+0x59f4): undefined reference to `__crtm_lifecycle_MOD_crtm_destroy' KMatrix_test.f90:(.text+0x5aa8): undefined reference to `\_\_message\_handler\_MOD\_display\_message’  
KMatrix\_test.f90:(.text+0x5b41): undefined reference to `__crtm_atmosphere_define_MOD_crtm_atmosphere_destroy' KMatrix_test.f90:(.text+0x5b78): undefined reference to `\_\_crtm\_atmosphere\_define\_MOD\_crtm\_atmosphere\_destroy’  
collect2: error: ld returned 1 exit status  
makefile:2: recipe for target ‘all’ failed  
make: \*\*\* [all] Error 1

Thnaks in advance.

---

<div class="post-metadata">

**Author:** ![StegmannJCSDA](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.jcsda.org/stegmannjcsda/32/53_2.png) [@StegmannJCSDA](https://forums.jcsda.org/u/StegmannJCSDA)\
**Post date:** [October 5, 2022, 12:17am UTC](https://forums.jcsda.org/t/unable-to-compiling-crtm-tutorial-with-crtm-2-3-0-gcc/395/2 "2022-10-05T00:17:10Z")

</div>

@Rajsharma you removed the `-lcrtm` flag for the linking step in the makefile.
