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

Error during compiling

Hi,I am try to compile CAM3 in Red Hat OS, with ifort10 and gcc.The configure process is fine, as below:creating /home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/Filepath
creating /home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/params.h
creating /home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/misc.h
creating /home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/preproc.h
creating /home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/Makefile
creating /home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/config_cache.xml
Looking for a valid GNU make... using gmake
Testing for Fortran 90 compatible compiler... Testing NetCDF library... ok
Testing MPI library... ok
configure done.but I meet the problem when doing compilation using gmake,I have set USER_FC=ifort and USER_CC=gcc, but it seems the gmake cannot found icc, it is oddI do not know what I should do, if anyone has any idear to help me figure it out
building CAM in /home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld ...
CAM build failed: see /home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/MAKE.outThe Error in MAKE.out is as below:
cat: Srcfiles: No such file or directory
Makefile:1083: /home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/Depends: No such file or directory
/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/atm/cam/bld/mkSrcfiles > /home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/Srcfiles
/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/atm/cam/bld/mkDepends Filepath Srcfiles > /home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/Depends
cd /home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf;
           echo "Build the ESMF library.";
           echo "ESMF is NOT supported by the CCSM project, but by the ESMF core team in NCAR/SCD";
           echo "See http://www.esmf.ucar.edu";
           gmake -j 1 BOPT=O ESMF_BUILD=/home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf ESMF_DIR=/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf ESMF_ARCH=linux_intel;
Build the ESMF library.
ESMF is NOT supported by the CCSM project, but by the ESMF core team in NCAR/SCD
See http://www.esmf.ucar.edu
gmake[1]: Entering directory `/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf'
==========================================
==========================================
On 2013 08 30 09:54:55 CST on hycom
Machine characteristics: Linux hycom 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
-----------------------------------------
Using C compiler: icc  -O  -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src/include -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/build/linux_intel -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/include   -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src/Infrastructure/mpiuni                          -D__SDIR__=''
C Compiler version:
/bin/sh: line 1: icc: command not found
gmake[1]: [info] Error 127 (Ignore)
C++ Compiler version:
/bin/sh: line 1: icc: command not found
gmake[1]: [info] Error 127 (Ignore)
Using Fortran compiler: ifort  -O -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src/include -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/build/linux_intel -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/include   -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src/Infrastructure/mpiuni                        
Fortran Compiler version:
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 10.1    Build 20090817 Package ID: l_fc_p_10.1.025
Copyright (C) 1985-2009 Intel Corporation.  All rights reserved.
FOR NON-COMMERCIAL USE ONLYESMC_VERSION_NUMBER "MF Version 0.0.1, Released Apr. 9, 2001"
-----------------------------------------
Using ESMF flags:                    
-----------------------------------------
Using configuration flags:
#define INCLUDED_CONF_H
#define PARCH_linux_intel
#define ESMF_ARCH_NAME "linux_intel"
#define ESMC_HAVE_LIMITS_H
#define ESMC_HAVE_PWD_H
#define ESMC_HAVE_MALLOC_H
#define ESMC_HAVE_STRING_H
#define ESMC_HAVE_GETDOMAINNAME
#define ESMC_HAVE_DRAND48
#define ESMC_HAVE_UNAME
#define ESMC_HAVE_UNISTD_H
#define ESMC_HAVE_SYS_TIME_H
#define ESMC_HAVE_STDLIB_H
#define ESMC_HAVE_FORTRAN_UNDERSCORE
#define ESMC_HAVE_FORTRAN_UNDERSCORE_UNDERSCORE
#define FTN(func) func##_
#define ESMC_POINTER_SIZE 4
#define ESMC_HAVE_READLINK
#define ESMC_HAVE_MEMMOVE
#define ESMC_HAVE_TEMPLATED_COMPLEX
#define ESMC_HAVE_DOUBLE_ALIGN_MALLOC
#define ESMC_HAVE_MEMALIGN
#define ESMC_HAVE_SYS_RESOURCE_H
#define ESMC_SIZEOF_VOIDP 4
#define ESMC_SIZEOF_INT 4
#define ESMC_SIZEOF_DOUBLE 8
#define ESMC_USE_DYNAMIC_LIBRARIES 1
#define ESMC_HAVE_RTLD_GLOBAL 1
#define ESMC_HAVE_SYS_UTSNAME_H
-----------------------------------------
Using include paths: -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src/include -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/build/linux_intel -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/include   -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src/Infrastructure/mpiuni 
-----------------------------------------
Using ESMF directory: /home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf
Using ESMF arch: linux_intel
------------------------------------------
Using C linker: icc  -O  -Wl,-rpath,/home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/lib/libO/linux_intel
Using Fortran linker: ifort  -O -Wl,-rpath,/home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/lib/libO/linux_intel
Using libraries: -L/home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/lib/libO/linux_intel
==========================================
gmake[1]: [info_h] Error 127 (Ignore)
gmake[1]: [info_h] Error 127 (Ignore)
Making directory /home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/lib/libO/linux_intel for library
Making directory /home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/mod/modO/linux_intel for *.mod files
gmake[2]: Entering directory `/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf'
dir=`pwd`; cd /home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/mod/modO/linux_intel; gmake -f ${dir}/makefile MAKEFILE=${dir}/makefile lib
gmake[3]: Entering directory `/home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/mod/modO/linux_intel'
gmake[3]: Leaving directory `/home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/mod/modO/linux_intel'
vpathlib in: /home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src
gmake[3]: Entering directory `/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src'
dir=`pwd`; cd /home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/mod/modO/linux_intel; gmake -f ${dir}/makefile MAKEFILE=${dir}/makefile lib
gmake[4]: Entering directory `/home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/mod/modO/linux_intel'
gmake[4]: Leaving directory `/home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/mod/modO/linux_intel'
vpathlib in: /home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src/Infrastructure
gmake[4]: Entering directory `/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src/Infrastructure'
dir=`pwd`; cd /home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/mod/modO/linux_intel; gmake -f ${dir}/makefile MAKEFILE=${dir}/makefile lib
gmake[5]: Entering directory `/home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/mod/modO/linux_intel'
gmake[5]: Leaving directory `/home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/mod/modO/linux_intel'
vpathlib in: /home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src/Infrastructure/BasicUtil
gmake[5]: Entering directory `/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src/Infrastructure/BasicUtil'
dir=`pwd`; cd /home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/mod/modO/linux_intel; gmake -f ${dir}/makefile MAKEFILE=${dir}/makefile lib
gmake[6]: Entering directory `/home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/mod/modO/linux_intel'
gmake[7]: Entering directory `/home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/mod/modO/linux_intel'
icc  -c -O   -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src/include -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/build/linux_intel -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/include   -I/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src/Infrastructure/mpiuni                          -D__SDIR__='"src/Infrastructure/BasicUtil/"' /home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src/Infrastructure/BasicUtil/ESMC_BasicUtil.c
gmake[7]: icc:Command not found
gmake[7]: *** [/home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/lib/libO/linux_intel/libesmf.a(ESMC_BasicUtil.o)] 错误 127
gmake[7]: Leaving directory `/home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/mod/modO/linux_intel'
gmake[6]: *** [lib] Error 2
gmake[6]: Leaving directory `/home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/mod/modO/linux_intel'
gmake[5]: *** [vpathlib] Error 2
gmake[5]: Leaving directory `/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src/Infrastructure/BasicUtil'
gmake[4]: *** [tree] Error 1
gmake[4]: Leaving directory `/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src/Infrastructure'
gmake[3]: *** [tree] Error 1
gmake[3]: Leaving directory `/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf/src'
gmake[2]: *** [tree] Error 1
gmake[2]: Leaving directory `/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf'
gmake[1]: *** [build_libs] Error 2
gmake[1]: Leaving directory `/home/xshao/NCAR_CAM3/cam3p1pp2/cam1/models/utils/esmf'
gmake: *** [/home/xshao/NCAR_CAM3/cam3p1pp2/work/camrun/bld/esmf/lib/libO/linux_intel/libesmf.a] Error 2
 

eaton

CSEG and Liaisons
The ESMF build (which is independent of the CAM build) is using the file models/utils/esmf/build/linux_intel/base_variables to set the C compiler to icc.  You could try changing that to gcc. 
 
Hi, EatonThanks a lot for the helpful comment. I changed the C compiler from icc to gcc, and the error disappeared.But I meet another problem when doing the run. The error in std out is put in the attachment file "run.out1_.txt",To find out in which line the error occurs, I add the -debug option in the configure process, but I found that the errorin run process  did not occur this time. The std out information is put in the attachment file "run.out2_.debug_.txt",I do not konw what happened, How should I do to figure it out?Thanks in advance! 
 

eaton

CSEG and Liaisons
Often when an error disappears after turning on debug flags it's an indication that the compiler optimization is causing the problem.  Comparing the intel compiler options from our current Makefile against the very old cam3 version that you are using, one difference I see is that we now use "-fp-model precise".  You might try adding this to the FFLAGS macro in the ifort section of the Makefile.
 
Top