Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

[Porting] ./test.build failed when I'm trying to port CESM1_2_2

Hello,
I started to learn to port CESM1_2_2 recently. I did as the CESM User's Guide said, but failed at ./test.build. Here's the pio.bldlog:

set pio_dir=/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/pio
cd /disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/pio
set cmake_opts= -D USER_CMAKE_MODULE_PATH=/disk6/fkc/cesm1_2_2/scripts/ccsm_utils/CMake
set cmake_opts= -D USER_CMAKE_MODULE_PATH=/disk6/fkc/cesm1_2_2/scripts/ccsm_utils/CMake -D GENF90_PATH=/disk6/fkc/cesm1_2_2/tools/cprnc/genf90
gmake /disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/pio/Makefile MODEL=pio USER_CMAKE_OPTS= -D USER_CMAKE_MODULE_PATH=/disk6/fkc/cesm1_2_2/scripts/ccsm_utils/CMake -D GENF90_PATH=/disk6/fkc/cesm1_2_2/tools/cprnc/genf90 PIO_LIBDIR=/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/pio -f /disk6/fkc/cesm1_2_2/scripts/test/Tools/Makefile
cd /disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/pio;
CC=mpicc CXX=mpicxx FC=mpif90 LDFLAGS="" cmake -D CMAKE_Fortran_FLAGS:STRING="-O -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none -DLINUX -DNDEBUG -DMCT_INTERFACE -DHAVE_MPI -DFORTRANUNDERSCORE -DNO_R16 -DFORTRANUNDERSCORE -DNO_R16 -DLINUX -DCPRGNU -DHAVE_SLASHPROC -I. -I/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/include -I/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share -I/disk6/fkc/packman/netcdf_c/4.3.2/0/include -I/disk6/fkc/packman/mpich/3.1.2/0/include -I/disk6/fkc/pnetcdf/include -I/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/include -I/disk6/fkc/cesm1_2_2/models/csm_share/shr" -D CMAKE_C_FLAGS:STRING=" -DLINUX -DNDEBUG -DMCT_INTERFACE -DHAVE_MPI -DFORTRANUNDERSCORE -DNO_R16 -DFORTRANUNDERSCORE -DNO_R16 -DLINUX -DCPRGNU -DHAVE_SLASHPROC -I. -I/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/include -I/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share -I/disk6/fkc/packman/netcdf_c/4.3.2/0/include -I/disk6/fkc/packman/mpich/3.1.2/0/include -I/disk6/fkc/pnetcdf/include -I/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/include -I/disk6/fkc/cesm1_2_2/models/csm_share/shr" -D CMAKE_CXX_FLAGS:STRING=" -DLINUX -DNDEBUG -DMCT_INTERFACE -DHAVE_MPI -DFORTRANUNDERSCORE -DNO_R16 -DFORTRANUNDERSCORE -DNO_R16 -DLINUX -DCPRGNU -DHAVE_SLASHPROC -I. -I/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/include -I/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share -I/disk6/fkc/packman/netcdf_c/4.3.2/0/include -I/disk6/fkc/packman/mpich/3.1.2/0/include -I/disk6/fkc/pnetcdf/include -I/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/include -I/disk6/fkc/cesm1_2_2/models/csm_share/shr" -D CMAKE_VERBOSE_MAKEFILE:BOOL=ON -D NETCDF_DIR:STRING=/disk6/fkc/packman/netcdf_c/4.3.2/0 -D USER_CMAKE_MODULE_DIR:STRING=/disk6/fkc/cesm1_2_2/scripts/ccsm_utils/CMake -D PNETCDF_DIR:STRING="/disk6/fkc/pnetcdf" -D USER_CMAKE_MODULE_PATH=/disk6/fkc/cesm1_2_2/scripts/ccsm_utils/CMake -D GENF90_PATH=/disk6/fkc/cesm1_2_2/tools/cprnc/genf90 /disk6/fkc/cesm1_2_2/models/utils/pio
CMake Error at CMakeLists.txt:44 (TRY_COMPILE):
Unknown extension ".f90" for file

/disk6/fkc/cesm1_2_2/models/utils/pio/cmake/TryMPIIO.f90

try_compile() works only for enabled languages. Currently these are:

C CXX

See project() command to enable other languages.


-- MPIIO not detected and therefore disabled.
-- Configuring incomplete, errors occurred!
See also "/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/pio/CMakeFiles/CMakeOutput.log".
gmake: *** [/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/pio/Makefile] Error 1
exit 1


I'm using the gnu compiler to compile CESM and sure that gfortran is available. I guess it's just a problem concerning compiler settings. And here's my Macros file attached below.
I'm stuck here for several days. Any help would be greatly appreciated.Thanks.
 

jedwards

CSEG and Liaisons
Staff member
I've never seen this error before - what version of cmake are you using?Try adding  the following in the CMakeLists.txt file in the pio directory:
Code:
ENABLE_LANGUAGE(Fortran)
 

jedwards

CSEG and Liaisons
Staff member
I've never seen this error before - what version of cmake are you using?Try adding  the following in the CMakeLists.txt file in the pio directory:
Code:
ENABLE_LANGUAGE(Fortran)
 
It worked. Thank you very much, but another error appeared when building csmshare. Here's csm_share.bldlog. Main errors are like  /disk6/fkc/cesm1_2_2/models/csm_share/shr/shr_pcdf_mod.F90(231): error #6404: This name does not have a type, and must have an explicit type.   [PIO_64BIT_OFFSET]        if (lcdf64) nmode = ior(nmode,PIO_64BIT_OFFSET)--------------------------------------^/disk6/fkc/cesm1_2_2/models/csm_share/shr/shr_pcdf_mod.F90(231): error #6363: The intrinsic data types of the arguments must be the same.   [IOR]        if (lcdf64) nmode = ior(nmode,PIO_64BIT_OFFSET)--------------------------------------^/disk6/fkc/cesm1_2_2/models/csm_share/shr/shr_pcdf_mod.F90(235): error #6363: The intrinsic data types of the arguments must be the same.   [IOR]        if (lcdf64) nmode = ior(nmode,PIO_64BIT_OFFSET)--------------------------------------^/disk6/fkc/cesm1_2_2/models/drv/shr/seq_io_mod.F90(1170): error #6404: This name does not have a type, and must have an explicit type.   [PIO_UNLIMITED]      rcode = pio_def_dim(cpl_io_file,'time',PIO_UNLIMITED,dimid(1))---------------------------------------------^compilation aborted for /disk6/fkc/cesm1_2_2/models/drv/shr/seq_io_mod.F90 (code 1)gmake: *** [seq_io_mod.o] Error 1gmake: *** Waiting for unfinished jobs....compilation aborted for /disk6/fkc/cesm1_2_2/models/csm_share/shr/shr_pcdf_mod.F90 (code 1)gmake: *** [shr_pcdf_mod.o] Error 1 Do you have any suggestions?Thank you in advance.
 
It worked. Thank you very much, but another error appeared when building csmshare. Here's csm_share.bldlog. Main errors are like  /disk6/fkc/cesm1_2_2/models/csm_share/shr/shr_pcdf_mod.F90(231): error #6404: This name does not have a type, and must have an explicit type.   [PIO_64BIT_OFFSET]        if (lcdf64) nmode = ior(nmode,PIO_64BIT_OFFSET)--------------------------------------^/disk6/fkc/cesm1_2_2/models/csm_share/shr/shr_pcdf_mod.F90(231): error #6363: The intrinsic data types of the arguments must be the same.   [IOR]        if (lcdf64) nmode = ior(nmode,PIO_64BIT_OFFSET)--------------------------------------^/disk6/fkc/cesm1_2_2/models/csm_share/shr/shr_pcdf_mod.F90(235): error #6363: The intrinsic data types of the arguments must be the same.   [IOR]        if (lcdf64) nmode = ior(nmode,PIO_64BIT_OFFSET)--------------------------------------^/disk6/fkc/cesm1_2_2/models/drv/shr/seq_io_mod.F90(1170): error #6404: This name does not have a type, and must have an explicit type.   [PIO_UNLIMITED]      rcode = pio_def_dim(cpl_io_file,'time',PIO_UNLIMITED,dimid(1))---------------------------------------------^compilation aborted for /disk6/fkc/cesm1_2_2/models/drv/shr/seq_io_mod.F90 (code 1)gmake: *** [seq_io_mod.o] Error 1gmake: *** Waiting for unfinished jobs....compilation aborted for /disk6/fkc/cesm1_2_2/models/csm_share/shr/shr_pcdf_mod.F90 (code 1)gmake: *** [shr_pcdf_mod.o] Error 1 Do you have any suggestions?Thank you in advance.
 

jedwards

CSEG and Liaisons
Staff member
Your PIO build did not complete successfully.   Try starting over - run $case.clean_build and build again.   If the problem occurs again look in the pio bldlog for an error.   
 

jedwards

CSEG and Liaisons
Staff member
Your PIO build did not complete successfully.   Try starting over - run $case.clean_build and build again.   If the problem occurs again look in the pio bldlog for an error.   
 
Thank you for your quick reply. I started over and tried again, but the problem remained the same. Here's my pio.bldlog, I couldn't find any errors there. I configured the pio with ./configure CC=gcc FC=gfortran MPICC=mpicc MPIFC=mpif90. When downloading cesm, I failed to get the pio file from the command "svn co ftp:***" so I downloaded pio directly from https://code.google.com/p/parallelio/downloads/list, could it cause the error?
 
Thank you for your quick reply. I started over and tried again, but the problem remained the same. Here's my pio.bldlog, I couldn't find any errors there. I configured the pio with ./configure CC=gcc FC=gfortran MPICC=mpicc MPIFC=mpif90. When downloading cesm, I failed to get the pio file from the command "svn co ftp:***" so I downloaded pio directly from https://code.google.com/p/parallelio/downloads/list, could it cause the error?
 

jedwards

CSEG and Liaisons
Staff member
Yes, that's not going to be the correct version.   You should be able to svn co http://parallelio.googlecode.com/svn/trunk_tags/pio1_8_12/pio
if not, I've attached the correct tar file.   
 

jedwards

CSEG and Liaisons
Staff member
Yes, that's not going to be the correct version.   You should be able to svn co http://parallelio.googlecode.com/svn/trunk_tags/pio1_8_12/pio
if not, I've attached the correct tar file.   
 
Thank you for your time. It seems that my pio is successfully built, but the building of cesm failed. Here's my cesm.bldlog: mpif90  -o /disk6/fkc/cesm1_2_2/build/cesm.exe ccsm_comp_mod.o ccsm_driver.o mrg_mod.o seq_avdata_mod.o seq_diag_mct.o seq_domain_mct.o seq_flux_mct.o seq_frac_mct.o seq_hist_mod.o seq_map_esmf.o seq_map_mod.o seq_mctext_mod.o seq_rest_mod.o  -L/disk6/fkc/cesm1_2_2/build/lib/ -latm  -L/disk6/fkc/cesm1_2_2/build/lib/ -lice  -L/disk6/fkc/cesm1_2_2/build/lib/ -llnd  -L/disk6/fkc/cesm1_2_2/build/lib/ -locn  -L/disk6/fkc/cesm1_2_2/build/lib/ -lrof  -L/disk6/fkc/cesm1_2_2/build/lib/ -lglc  -L/disk6/fkc/cesm1_2_2/build/lib/ -lwav -L/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share -lcsm_share -L/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/lib -lpio -lgptl -lmct -lmpeu -L/disk6/fkc/packman/netcdf_c/4.3.2/0/lib -lnetcdf  -L/disk6/fkc/pnetcdf/lib -lpnetcdf -L/disk6/fkc/packman/mpich/3.1.2/0/lib -lmpi/disk1/soft/intel//Compiler/11.0/069/lib/intel64/libimf.so: warning: warning: feupdateenv is not implemented and will always fail/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share/libcsm_share.a(shr_mct_mod.o): In function `shr_mct_mod_mp_shr_mct_smatreadnc_':/disk6/fkc/cesm1_2_2/models/csm_share/shr/shr_mct_mod.F90:(.text+0x16c0): undefined reference to `nf_open_'/disk6/fkc/cesm1_2_2/models/csm_share/shr/shr_mct_mod.F90:(.text+0x16e4): undefined reference to `nf_inq_dimid_'/disk6/fkc/cesm1_2_2/models/csm_share/shr/shr_mct_mod.F90:(.text+0x16fa): undefined reference to `nf_inq_dimlen_' And there're plenty errors like that. I guess it's a problem with netcdf libs.According to the bldlog information"-L/disk6/fkc/packman/netcdf_c/4.3.2/0/lib -lnetcdf", the netcdf libs it used should be in this directory. I've copied netcdf_fortran libs to this directory but still failed. By the way, there're plenty warnings like  mpif90  -c -I.  -I/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/include -I/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share -I/disk6/fkc/packman/netcdf_c/4.3.2/0/include -I/disk6/fkc/packman/mpich/3.1.2/0/include -I/disk6/fkc/pnetcdf/include -I/disk6/fkc/cesm1_2_2/build/atm/obj -I/disk6/fkc/cesm1_2_2/build/lnd/obj -I/disk6/fkc/cesm1_2_2/build/ice/obj -I/disk6/fkc/cesm1_2_2/build/ocn/obj -I/disk6/fkc/cesm1_2_2/build/glc/obj -I/disk6/fkc/cesm1_2_2/build/rof/obj -I/disk6/fkc/cesm1_2_2/build/wav/obj -I/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/include -I/disk6/fkc/cesm1_2_2/models/csm_share/shr -I. -I/disk6/fkc/cesm1_2_2/scripts/test/SourceMods/src.drv -I/disk6/fkc/cesm1_2_2/models/drv/driver -I/disk6/fkc/cesm1_2_2/build/lib/include  -O -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none  -DNUM_COMP_INST_ATM=1 -DNUM_COMP_INST_LND=1 -DNUM_COMP_INST_OCN=1 -DNUM_COMP_INST_ICE=1 -DNUM_COMP_INST_GLC=1 -DNUM_COMP_INST_WAV=1 -DLINUX  -DNDEBUG -DMCT_INTERFACE -DHAVE_MPI -DFORTRANUNDERSCORE -DNO_R16 -DFORTRANUNDERSCORE -DNO_R16 -DLINUX -DCPRGNU  -DHAVE_SLASHPROC -ffree-form   /disk6/fkc/cesm1_2_2/models/drv/driver/seq_avdata_mod.F90ifort: command line warning #10006: ignoring unknown option '-fconvert=big-endian'ifort: command line warning #10006: ignoring unknown option '-ffree-line-length-none'ifort: command line warning #10006: ignoring unknown option '-ffixed-line-length-none'ifort: command line warning #10006: ignoring unknown option '-ffree-form'ifort: command line warning #10006: ignoring unknown option '-fconvert=big-endian' Does that matter?
 
Thank you for your time. It seems that my pio is successfully built, but the building of cesm failed. Here's my cesm.bldlog: mpif90  -o /disk6/fkc/cesm1_2_2/build/cesm.exe ccsm_comp_mod.o ccsm_driver.o mrg_mod.o seq_avdata_mod.o seq_diag_mct.o seq_domain_mct.o seq_flux_mct.o seq_frac_mct.o seq_hist_mod.o seq_map_esmf.o seq_map_mod.o seq_mctext_mod.o seq_rest_mod.o  -L/disk6/fkc/cesm1_2_2/build/lib/ -latm  -L/disk6/fkc/cesm1_2_2/build/lib/ -lice  -L/disk6/fkc/cesm1_2_2/build/lib/ -llnd  -L/disk6/fkc/cesm1_2_2/build/lib/ -locn  -L/disk6/fkc/cesm1_2_2/build/lib/ -lrof  -L/disk6/fkc/cesm1_2_2/build/lib/ -lglc  -L/disk6/fkc/cesm1_2_2/build/lib/ -lwav -L/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share -lcsm_share -L/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/lib -lpio -lgptl -lmct -lmpeu -L/disk6/fkc/packman/netcdf_c/4.3.2/0/lib -lnetcdf  -L/disk6/fkc/pnetcdf/lib -lpnetcdf -L/disk6/fkc/packman/mpich/3.1.2/0/lib -lmpi/disk1/soft/intel//Compiler/11.0/069/lib/intel64/libimf.so: warning: warning: feupdateenv is not implemented and will always fail/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share/libcsm_share.a(shr_mct_mod.o): In function `shr_mct_mod_mp_shr_mct_smatreadnc_':/disk6/fkc/cesm1_2_2/models/csm_share/shr/shr_mct_mod.F90:(.text+0x16c0): undefined reference to `nf_open_'/disk6/fkc/cesm1_2_2/models/csm_share/shr/shr_mct_mod.F90:(.text+0x16e4): undefined reference to `nf_inq_dimid_'/disk6/fkc/cesm1_2_2/models/csm_share/shr/shr_mct_mod.F90:(.text+0x16fa): undefined reference to `nf_inq_dimlen_' And there're plenty errors like that. I guess it's a problem with netcdf libs.According to the bldlog information"-L/disk6/fkc/packman/netcdf_c/4.3.2/0/lib -lnetcdf", the netcdf libs it used should be in this directory. I've copied netcdf_fortran libs to this directory but still failed. By the way, there're plenty warnings like  mpif90  -c -I.  -I/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/include -I/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share -I/disk6/fkc/packman/netcdf_c/4.3.2/0/include -I/disk6/fkc/packman/mpich/3.1.2/0/include -I/disk6/fkc/pnetcdf/include -I/disk6/fkc/cesm1_2_2/build/atm/obj -I/disk6/fkc/cesm1_2_2/build/lnd/obj -I/disk6/fkc/cesm1_2_2/build/ice/obj -I/disk6/fkc/cesm1_2_2/build/ocn/obj -I/disk6/fkc/cesm1_2_2/build/glc/obj -I/disk6/fkc/cesm1_2_2/build/rof/obj -I/disk6/fkc/cesm1_2_2/build/wav/obj -I/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/include -I/disk6/fkc/cesm1_2_2/models/csm_share/shr -I. -I/disk6/fkc/cesm1_2_2/scripts/test/SourceMods/src.drv -I/disk6/fkc/cesm1_2_2/models/drv/driver -I/disk6/fkc/cesm1_2_2/build/lib/include  -O -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none  -DNUM_COMP_INST_ATM=1 -DNUM_COMP_INST_LND=1 -DNUM_COMP_INST_OCN=1 -DNUM_COMP_INST_ICE=1 -DNUM_COMP_INST_GLC=1 -DNUM_COMP_INST_WAV=1 -DLINUX  -DNDEBUG -DMCT_INTERFACE -DHAVE_MPI -DFORTRANUNDERSCORE -DNO_R16 -DFORTRANUNDERSCORE -DNO_R16 -DLINUX -DCPRGNU  -DHAVE_SLASHPROC -ffree-form   /disk6/fkc/cesm1_2_2/models/drv/driver/seq_avdata_mod.F90ifort: command line warning #10006: ignoring unknown option '-fconvert=big-endian'ifort: command line warning #10006: ignoring unknown option '-ffree-line-length-none'ifort: command line warning #10006: ignoring unknown option '-ffixed-line-length-none'ifort: command line warning #10006: ignoring unknown option '-ffree-form'ifort: command line warning #10006: ignoring unknown option '-fconvert=big-endian' Does that matter?
 

jedwards

CSEG and Liaisons
Staff member
mpif90 is pointing to the intel compiler - If you want to use the gnu compiler you need to make sure that the mpi wrappers are pointing to that one by setting the paths correctly in your environment.
 

jedwards

CSEG and Liaisons
Staff member
mpif90 is pointing to the intel compiler - If you want to use the gnu compiler you need to make sure that the mpi wrappers are pointing to that one by setting the paths correctly in your environment.
 
According to your suggestion, I installed mpich again and there's no compiler warning any more. But this error remains the same, here's cesm.bldlog: mpif90  -o /disk6/fkc/cesm1_2_2/build/cesm.exe ccsm_comp_mod.o ccsm_driver.o mrg_mod.o seq_avdata_mod.o seq_diag_mct.o seq_domain_mct.o seq_flux_mct.o seq_frac_mct.o seq_hist_mod.o seq_map_esmf.o seq_map_mod.o seq_mctext_mod.o seq_rest_mod.o  -L/disk6/fkc/cesm1_2_2/build/lib/ -latm  -L/disk6/fkc/cesm1_2_2/build/lib/ -lice  -L/disk6/fkc/cesm1_2_2/build/lib/ -llnd  -L/disk6/fkc/cesm1_2_2/build/lib/ -locn  -L/disk6/fkc/cesm1_2_2/build/lib/ -lrof  -L/disk6/fkc/cesm1_2_2/build/lib/ -lglc  -L/disk6/fkc/cesm1_2_2/build/lib/ -lwav -L/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share -lcsm_share -L/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/lib -lpio -lgptl -lmct -lmpeu -L/disk6/fkc/packman/netcdf_c/4.3.2/0/lib -lnetcdf  -L/disk6/fkc/pnetcdf/lib -lpnetcdf -L/disk6/fkc/packman/mpich/3.1.2/0/lib -lmpi/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share/libcsm_share.a(shr_mct_mod.o): In function `__shr_mct_mod_MOD_shr_mct_smatreaddnc':shr_mct_mod.F90:(.text+0xef0): undefined reference to `nf_open_'shr_mct_mod.F90:(.text+0xfa7): undefined reference to `nf_strerror_'shr_mct_mod.F90:(.text+0x1009): undefined reference to `nf_inq_dimid_'shr_mct_mod.F90:(.text+0x1032): undefined reference to `nf_inq_dimlen_'shr_mct_mod.F90:(.text+0x105d): undefined reference to `nf_inq_dimid_'shr_mct_mod.F90:(.text+0x1086): undefined reference to `nf_inq_dimlen_' Thank you again! 
 
According to your suggestion, I installed mpich again and there's no compiler warning any more. But this error remains the same, here's cesm.bldlog: mpif90  -o /disk6/fkc/cesm1_2_2/build/cesm.exe ccsm_comp_mod.o ccsm_driver.o mrg_mod.o seq_avdata_mod.o seq_diag_mct.o seq_domain_mct.o seq_flux_mct.o seq_frac_mct.o seq_hist_mod.o seq_map_esmf.o seq_map_mod.o seq_mctext_mod.o seq_rest_mod.o  -L/disk6/fkc/cesm1_2_2/build/lib/ -latm  -L/disk6/fkc/cesm1_2_2/build/lib/ -lice  -L/disk6/fkc/cesm1_2_2/build/lib/ -llnd  -L/disk6/fkc/cesm1_2_2/build/lib/ -locn  -L/disk6/fkc/cesm1_2_2/build/lib/ -lrof  -L/disk6/fkc/cesm1_2_2/build/lib/ -lglc  -L/disk6/fkc/cesm1_2_2/build/lib/ -lwav -L/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share -lcsm_share -L/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/lib -lpio -lgptl -lmct -lmpeu -L/disk6/fkc/packman/netcdf_c/4.3.2/0/lib -lnetcdf  -L/disk6/fkc/pnetcdf/lib -lpnetcdf -L/disk6/fkc/packman/mpich/3.1.2/0/lib -lmpi/disk6/fkc/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share/libcsm_share.a(shr_mct_mod.o): In function `__shr_mct_mod_MOD_shr_mct_smatreaddnc':shr_mct_mod.F90:(.text+0xef0): undefined reference to `nf_open_'shr_mct_mod.F90:(.text+0xfa7): undefined reference to `nf_strerror_'shr_mct_mod.F90:(.text+0x1009): undefined reference to `nf_inq_dimid_'shr_mct_mod.F90:(.text+0x1032): undefined reference to `nf_inq_dimlen_'shr_mct_mod.F90:(.text+0x105d): undefined reference to `nf_inq_dimid_'shr_mct_mod.F90:(.text+0x1086): undefined reference to `nf_inq_dimlen_' Thank you again! 
 
Top