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

configure generate_batch error

Hello everyone,

I have a problem in building the CCSM3.0
my error is like this, if anybody can help me out, please reply.

e027chs@lg03:/ytmp/e027chs/yogesh/ccsm3_0/scripts/test1>./test1.generic_linux.build
-------------------------------------------------------------------------
Preparing T42_gx1v3 component models for execution
-------------------------------------------------------------------------
- Create execution directories for atm,cpl,lnd,ice,ocn
- If a restart run then copy restart files into executable directory
ccsm_getrestart: get /ytmp/e027chs/yogesh/test1 restarts from /ytmp/e027chs/archive/test1/restart
- Check validity of configuration
- Determine if build must happen (env variable BLDTYPE)
- Build flag (BLDTYPE) is TRUE
- Build Libraries: esmf, mph, mct
Fri May 9 20:05:03 KST 2008 esmf.buildlib.080509-200503
Fri May 9 20:05:04 KST 2008 mph.buildlib.080509-200503
Fri May 9 20:05:04 KST 2008 mct.buildlib.080509-200503
- Create model directories for each platform
- Determine if models must be rebuilt
- Build model executables, create namelist files, prestage input data
Fri May 9 20:05:09 KST 2008 /ytmp/e027chs/yogesh/test1/cpl/cpl.log.080509-200503
Fri May 9 20:05:09 KST 2008 /ytmp/e027chs/yogesh/test1/cpl/cpl.buildexe.080509-200503
ERROR: cpl.buildexe.csh failed, see cpl.buildexe.080509-200503
ERROR: cat /ytmp/e027chs/yogesh/test1/cpl/cpl.buildexe.080509-200503

test1.generic_linux.build and test1.generic_linux.run is generating but, archive is not.

any help would be appreciated.
thankx.
 
can you show output of error logfile created /ytmp/e027chs/yogesh/test1/cpl/cpl.buildexe.080509-200503

say by using
cat /ytmp/e027chs/yogesh/test1/cpl/cpl.buildexe.080509-200503


yogeshkumkar said:
Hello everyone,

I have a problem in building the CCSM3.0
my error is like this, if anybody can help me out, please reply.

e027chs@lg03:/ytmp/e027chs/yogesh/ccsm3_0/scripts/test1>./test1.generic_linux.build
-------------------------------------------------------------------------
Preparing T42_gx1v3 component models for execution
-------------------------------------------------------------------------
- Create execution directories for atm,cpl,lnd,ice,ocn
- If a restart run then copy restart files into executable directory
ccsm_getrestart: get /ytmp/e027chs/yogesh/test1 restarts from /ytmp/e027chs/archive/test1/restart
- Check validity of configuration
- Determine if build must happen (env variable BLDTYPE)
- Build flag (BLDTYPE) is TRUE
- Build Libraries: esmf, mph, mct
Fri May 9 20:05:03 KST 2008 esmf.buildlib.080509-200503
Fri May 9 20:05:04 KST 2008 mph.buildlib.080509-200503
Fri May 9 20:05:04 KST 2008 mct.buildlib.080509-200503
- Create model directories for each platform
- Determine if models must be rebuilt
- Build model executables, create namelist files, prestage input data
Fri May 9 20:05:09 KST 2008 /ytmp/e027chs/yogesh/test1/cpl/cpl.log.080509-200503
Fri May 9 20:05:09 KST 2008 /ytmp/e027chs/yogesh/test1/cpl/cpl.buildexe.080509-200503
ERROR: cpl.buildexe.csh failed, see cpl.buildexe.080509-200503
ERROR: cat /ytmp/e027chs/yogesh/test1/cpl/cpl.buildexe.080509-200503

test1.generic_linux.build and test1.generic_linux.run is generating but, archive is not.

any help would be appreciated.
thankx.
 
Thank you for your reply.
I have set the netcdf path correctly. I tried again and this time a big logfile generated.
The 'head' of the file cpl.buildexe.080514-114322 is as:


e027chs@lg03:/ytmp/e027chs/yogesh/exe/test1/cpl>head cpl.buildexe.080514-114322
Wed May 14 11:43:29 KST 2008 /ytmp/e027chs/yogesh/exe/test1/cpl/cpl.buildexe.080514-114322
/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/bin/mpif90 -o /ytmp/e027chs/yogesh/exe/test1/cpl/cpl areafact_mod.o bitCheck_mod.o cpl_bundle_mod.o cpl_comm_mod.o cpl_const_mod.o cpl_contract_mod.o cpl_control_mod.o cpl_domain_mod.o cpl_fields_mod.o cpl_infobuf_mod.o cpl_interface_mod.o cpl_iobin_mod.o cpl_iocdf_mod.o cpl_kind_mod.o cpl_map_mod.o cpl_mct_mod.o data_mod.o diag_mod.o flux_mod.o frac_mod.o history_mod.o main.o merge_mod.o restart_mod.o shr_alarm_mod.o shr_cal_mod.o shr_const_mod.o shr_date_mod.o shr_file_mod.o shr_kind_mod.o shr_mpi_mod.o shr_msg_mod.o shr_orb_mod.o shr_sys_mod.o shr_timer_mod.o shr_vmath_fwrap.o shr_vmath_mod.o tStamp_mod.o timeCheck.o -L/opt/ksc/gnu/lib -lnetcdf -L/usr/lib -llapack -lblas -L/ytmp/e027chs/yogesh/exe/test1/lib -lesmf -lmct -lmpeu -lmph
/opt/pgi/linux86/5.2/lib/f90main.o: In function `main':
/opt/pgi/linux86/5.2/lib/f90main.o(.text+0x75): undefined reference to `MAIN_'
bitCheck_mod.o: In function `bitcheck_mod_mp_bitcheck_write_':
bitCheck_mod.o(.text+0x84): undefined reference to `for_write_seq_fmt'
bitCheck_mod.o(.text+0x9b): undefined reference to `for_trim'
bitCheck_mod.o(.text+0xc8): undefined reference to `for_write_seq_fmt_xmit'
bitCheck_mod.o(.text+0x150): undefined reference to `for_trim'
bitCheck_mod.o(.text+0x351): undefined reference to `for_write_seq_fmt'


***********************************************
The tail of the same file log file is as:


e027chs@lg03:/ytmp/e027chs/yogesh/exe/test1/cpl>tail cpl.buildexe.080514-114322
mph.o(.text+0x3160): undefined reference to `for_stop_core'
/ytmp/e027chs/yogesh/exe/test1/lib/libmph.a(mph.o): In function `mph_module_mp_mph_exe_low_proc_limit_':
mph.o(.text+0x31dd): undefined reference to `for_write_seq_lis'
mph.o(.text+0x3210): undefined reference to `for_write_seq_lis'
mph.o(.text+0x3224): undefined reference to `for_stop_core'
/ytmp/e027chs/yogesh/exe/test1/lib/libmph.a(mph.o): In function `mph_module_mp_mph_exe_up_proc_limit_':
mph.o(.text+0x3303): undefined reference to `for_write_seq_lis'
mph.o(.text+0x3336): undefined reference to `for_write_seq_lis'
mph.o(.text+0x334a): undefined reference to `for_stop_core'
gmake: *** [/ytmp/e027chs/yogesh/exe/test1/cpl/cpl] Error 2


In between the messeges are related to mod files generated in (e027chs@lg03:/ytmp/e027chs/yogesh/exe/test1/cpl/obj>) the 'obj' directory same as these.

Thanking you in advance.
 
can you show your macros(i guess .linux) file?

yogeshkumkar said:
Thank you for your reply.
I have set the netcdf path correctly. I tried again and this time a big logfile generated.
The 'head' of the file cpl.buildexe.080514-114322 is as:


e027chs@lg03:/ytmp/e027chs/yogesh/exe/test1/cpl>head cpl.buildexe.080514-114322
Wed May 14 11:43:29 KST 2008 /ytmp/e027chs/yogesh/exe/test1/cpl/cpl.buildexe.080514-114322
/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/bin/mpif90 -o /ytmp/e027chs/yogesh/exe/test1/cpl/cpl areafact_mod.o bitCheck_mod.o cpl_bundle_mod.o cpl_comm_mod.o cpl_const_mod.o cpl_contract_mod.o cpl_control_mod.o cpl_domain_mod.o cpl_fields_mod.o cpl_infobuf_mod.o cpl_interface_mod.o cpl_iobin_mod.o cpl_iocdf_mod.o cpl_kind_mod.o cpl_map_mod.o cpl_mct_mod.o data_mod.o diag_mod.o flux_mod.o frac_mod.o history_mod.o main.o merge_mod.o restart_mod.o shr_alarm_mod.o shr_cal_mod.o shr_const_mod.o shr_date_mod.o shr_file_mod.o shr_kind_mod.o shr_mpi_mod.o shr_msg_mod.o shr_orb_mod.o shr_sys_mod.o shr_timer_mod.o shr_vmath_fwrap.o shr_vmath_mod.o tStamp_mod.o timeCheck.o -L/opt/ksc/gnu/lib -lnetcdf -L/usr/lib -llapack -lblas -L/ytmp/e027chs/yogesh/exe/test1/lib -lesmf -lmct -lmpeu -lmph
/opt/pgi/linux86/5.2/lib/f90main.o: In function `main':
/opt/pgi/linux86/5.2/lib/f90main.o(.text+0x75): undefined reference to `MAIN_'
bitCheck_mod.o: In function `bitcheck_mod_mp_bitcheck_write_':
bitCheck_mod.o(.text+0x84): undefined reference to `for_write_seq_fmt'
bitCheck_mod.o(.text+0x9b): undefined reference to `for_trim'
bitCheck_mod.o(.text+0xc8): undefined reference to `for_write_seq_fmt_xmit'
bitCheck_mod.o(.text+0x150): undefined reference to `for_trim'
bitCheck_mod.o(.text+0x351): undefined reference to `for_write_seq_fmt'


***********************************************
The tail of the same file log file is as:


e027chs@lg03:/ytmp/e027chs/yogesh/exe/test1/cpl>tail cpl.buildexe.080514-114322
mph.o(.text+0x3160): undefined reference to `for_stop_core'
/ytmp/e027chs/yogesh/exe/test1/lib/libmph.a(mph.o): In function `mph_module_mp_mph_exe_low_proc_limit_':
mph.o(.text+0x31dd): undefined reference to `for_write_seq_lis'
mph.o(.text+0x3210): undefined reference to `for_write_seq_lis'
mph.o(.text+0x3224): undefined reference to `for_stop_core'
/ytmp/e027chs/yogesh/exe/test1/lib/libmph.a(mph.o): In function `mph_module_mp_mph_exe_up_proc_limit_':
mph.o(.text+0x3303): undefined reference to `for_write_seq_lis'
mph.o(.text+0x3336): undefined reference to `for_write_seq_lis'
mph.o(.text+0x334a): undefined reference to `for_stop_core'
gmake: *** [/ytmp/e027chs/yogesh/exe/test1/cpl/cpl] Error 2


In between the messeges are related to mod files generated in (e027chs@lg03:/ytmp/e027chs/yogesh/exe/test1/cpl/obj>) the 'obj' directory same as these.

Thanking you in advance.
 
The Macros.Linux file is as: (ccsm3.0/model/bld/Macros.Linux)

#===============================================================================
# CVS $Id: Macros.Linux,v 1.11 2003/10/09 14:09:50 tcraig Exp $
# CVS $Source: /fs/cgd/csm/models/CVS.REPOS/shared/bld/Macros.Linux,v $
# CVS $Name: ccsm3_0_rel04 $
#===============================================================================
# Makefile macros for "Linux", supports portland + gnu
#===============================================================================

ifeq ($(MACH),generic_linux)
INCLDIR := -I. -I/opt/ksc/gnu/include -I/usr/include -I${INCROOT} -I/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/include
SLIBS := -L/opt/ksc/gnu/lib -lnetcdf -L/usr/lib -llapack -lblas
else
INCLDIR := -I. -I$(INC_NETCDF) -I$(INCROOT) -I$(INC_MPI)
SLIBS := -L$(LIB_NETCDF) -lnetcdf -llapack -lblas
endif

ULIBS := -L$(LIBROOT) -lesmf -lmct -lmpeu -lmph
CPP := NONE
CPPFLAGS := -DLINUX -DPGF90 -DNO_SHR_VMATH
CPPDEFS := -DLINUX
#CC := /opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/gnu/ssh/bin/mpicc
CC := /opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/bin/mpicc
#CC := mpicc
CFLAGS := -c
ifeq ($(CC),pgcc)
CFLAGS += -fast
else
CFLAGS += -DUSE_GCC
endif
FIXEDFLAGS :=
FREEFLAGS := -Mfree
FC := /opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/bin/mpif90
#FC := mpif90
FFLAGS := -c -r4 -i4 -Kieee -Mrecursive -Mdalign -Mextend
# -g -Ktrap=fp -Mbounds
MOD_SUFFIX := mod
LD := $(FC)
#LDFLAGS := -L/usr/local/gm/lib -lgm -lpthread
#LDFLAGS := -L/usr/local/gm/lib -lgm
ifeq ($(CC),gcc)
LDFLAGS += -g77libs="-L/opt/pgi/linux86/5.2/lib -lpgf90 -lpgf90rtl -lpgftnrtl -lpgc"
endif
AR := ar

ifeq ($(MACH),jet)
INCLDIR := -I. -I/opt/ksc/gnu/include -I/usr/include -I${INCROOT} -I/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/include
SLIBS := -L/opt/ksc/gnu/lib -lnetcdf -L/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/lib -lmpich -llapack -L/usr/lib -lf77blas
# CC := /opt/pgi/linux86/5.2/bin/pgcc
CC := pgcc
# FC := /opt/pgi/linux86/5.2/bin/pgf90
FC := pgf90
LDFLAGS := -L/opt/gm/lib -lgm
endif


#FC := lf95
#FFLAGS := -c -g -CcdRR8 --trace --trap -DLINUX
#LDFLAGS := --staticlink

ifeq ($(MODEL),pop)
CPPDEFS := $(CPPDEFS) -DPOSIX -Dimpvmix -Dcoupled
-DNPROC_X=$(NX) -DNPROC_Y=$(NY)
FIXEDFLAGS := -byteswapio
endif

ifeq ($(MODEL),csim)
CPPDEFS := $(CPPDEFS) -Dcoupled -DNPROC_X=$(NX) -DNPROC_Y=$(NY) -D_MPI
FIXEDFLAGS := -byteswapio
endif

ifeq ($(THREAD),TRUE)
# CPPFLAGS := $(CPPFLAGS) -D_OPENMP
CPPDEFS := $(CPPDEFS) -D_OPENMP -DTHREADED_OMP
FREEFLAGS := $(FREEFLAGS) -mp
LDFLAGS := $(LDFLAGS) -mp
endif

ifeq ($(DEBUG),TRUE)
endif



Where should I make changes? please reply.
 
Hi,
You have two different SLIBS within "generic_linux" and "jet" if-statement.
It seems that the SLIBS of "jet" is correct since the one within generic_linux lacks the link of mpich library.

You might need to copy SLIBS from "jet" to "genetic_linux" if-statement, and try again.

If I were you who want to use "generic_linux", I will totally delete "jet" statement.

-odden

yogeshkumkar said:
The Macros.Linux file is as: (ccsm3.0/model/bld/Macros.Linux)

#===============================================================================
# CVS $Id: Macros.Linux,v 1.11 2003/10/09 14:09:50 tcraig Exp $
# CVS $Source: /fs/cgd/csm/models/CVS.REPOS/shared/bld/Macros.Linux,v $
# CVS $Name: ccsm3_0_rel04 $
#===============================================================================
# Makefile macros for "Linux", supports portland + gnu
#===============================================================================

ifeq ($(MACH),generic_linux)
INCLDIR := -I. -I/opt/ksc/gnu/include -I/usr/include -I${INCROOT} -I/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/include
SLIBS := -L/opt/ksc/gnu/lib -lnetcdf -L/usr/lib -llapack -lblas
else
INCLDIR := -I. -I$(INC_NETCDF) -I$(INCROOT) -I$(INC_MPI)
SLIBS := -L$(LIB_NETCDF) -lnetcdf -llapack -lblas
endif

ULIBS := -L$(LIBROOT) -lesmf -lmct -lmpeu -lmph
CPP := NONE
CPPFLAGS := -DLINUX -DPGF90 -DNO_SHR_VMATH
CPPDEFS := -DLINUX
#CC := /opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/gnu/ssh/bin/mpicc
CC := /opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/bin/mpicc
#CC := mpicc
CFLAGS := -c
ifeq ($(CC),pgcc)
CFLAGS += -fast
else
CFLAGS += -DUSE_GCC
endif
FIXEDFLAGS :=
FREEFLAGS := -Mfree
FC := /opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/bin/mpif90
#FC := mpif90
FFLAGS := -c -r4 -i4 -Kieee -Mrecursive -Mdalign -Mextend
# -g -Ktrap=fp -Mbounds
MOD_SUFFIX := mod
LD := $(FC)
#LDFLAGS := -L/usr/local/gm/lib -lgm -lpthread
#LDFLAGS := -L/usr/local/gm/lib -lgm
ifeq ($(CC),gcc)
LDFLAGS += -g77libs="-L/opt/pgi/linux86/5.2/lib -lpgf90 -lpgf90rtl -lpgftnrtl -lpgc"
endif
AR := ar

ifeq ($(MACH),jet)
INCLDIR := -I. -I/opt/ksc/gnu/include -I/usr/include -I${INCROOT} -I/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/include
SLIBS := -L/opt/ksc/gnu/lib -lnetcdf -L/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/lib -lmpich -llapack -L/usr/lib -lf77blas
# CC := /opt/pgi/linux86/5.2/bin/pgcc
CC := pgcc
# FC := /opt/pgi/linux86/5.2/bin/pgf90
FC := pgf90
LDFLAGS := -L/opt/gm/lib -lgm
endif


#FC := lf95
#FFLAGS := -c -g -CcdRR8 --trace --trap -DLINUX
#LDFLAGS := --staticlink

ifeq ($(MODEL),pop)
CPPDEFS := $(CPPDEFS) -DPOSIX -Dimpvmix -Dcoupled
-DNPROC_X=$(NX) -DNPROC_Y=$(NY)
FIXEDFLAGS := -byteswapio
endif

ifeq ($(MODEL),csim)
CPPDEFS := $(CPPDEFS) -Dcoupled -DNPROC_X=$(NX) -DNPROC_Y=$(NY) -D_MPI
FIXEDFLAGS := -byteswapio
endif

ifeq ($(THREAD),TRUE)
# CPPFLAGS := $(CPPFLAGS) -D_OPENMP
CPPDEFS := $(CPPDEFS) -D_OPENMP -DTHREADED_OMP
FREEFLAGS := $(FREEFLAGS) -mp
LDFLAGS := $(LDFLAGS) -mp
endif

ifeq ($(DEBUG),TRUE)
endif



Where should I make changes? please reply.
 
Dear Sir,
Thank you very much for your reply.
I have been struggling to get rid of the error which comes during ccsm build. I have set the SLIBS path in Macros.Linux as you said. This time different error messege has occured. The content of

ERROR: cpl.buildexe.csh failed, see cpl.buildexe.080526-093655
ERROR: cat /home2/e027chs/exe/new-dead-mod/cpl/cpl.buildexe.080526-093655 is like follows.

Mon May 26 09:36:58 KST 2008 /home2/e027chs/exe/new-dead-mod/cpl/cpl.buildexe.080526-093655
/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/bin/mpif90 -o /home2/e027chs/exe/new-dead-mod/cpl/cpl areafact_mod.o bitCheck_mod.o cpl_bundle_mod.o cpl_comm_mod.o cpl_const_mod.o cpl_contract_mod.o cpl_control_mod.o cpl_domain_mod.o cpl_fields_mod.o cpl_infobuf_mod.o cpl_interface_mod.o cpl_iobin_mod.o cpl_iocdf_mod.o cpl_kind_mod.o cpl_map_mod.o cpl_mct_mod.o data_mod.o diag_mod.o flux_mod.o frac_mod.o history_mod.o main.o merge_mod.o restart_mod.o shr_alarm_mod.o shr_cal_mod.o shr_const_mod.o shr_date_mod.o shr_file_mod.o shr_kind_mod.o shr_mpi_mod.o shr_msg_mod.o shr_orb_mod.o shr_sys_mod.o shr_timer_mod.o shr_vmath_fwrap.o shr_vmath_mod.o tStamp_mod.o timeCheck.o -L/opt/ksc/gnu/lib -lnetcdf -L/usr/lib -llapack -lblas -L/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/lib -lmpich -L/home2/e027chs/exe/new-dead-mod/lib -lesmf -lmct -lmpeu -lmph
cpl_iocdf_mod.o: In function `cpl_iocdf_mod_cpl_iocdf_create_':
cpl_iocdf_mod.o(.text+0x23e): undefined reference to `nf_create_'
cpl_iocdf_mod.o(.text+0x4c6): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x518): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x61c): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0x7ab): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0x82d): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0x8af): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0x982): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0x9be): undefined reference to `nf_def_dim_'
cpl_iocdf_mod.o(.text+0xa0d): undefined reference to `nf_def_var_'
cpl_iocdf_mod.o(.text+0xa9c): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0xb2b): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0xbba): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0xc49): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0xc7f): undefined reference to `nf_def_dim_'
cpl_iocdf_mod.o(.text+0xcb2): undefined reference to `nf_inq_dimid_'
cpl_iocdf_mod.o(.text+0xcdf): undefined reference to `nf_inq_dimid_'
cpl_iocdf_mod.o(.text+0xd28): undefined reference to `nf_def_var_'
cpl_iocdf_mod.o(.text+0xdb7): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0xe46): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0xed5): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0xee6): undefined reference to `nf_close_'
cpl_iocdf_mod.o(.text+0x1084): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x10d6): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o: In function `cpl_iocdf_mod_cpl_iocdf_open_':
cpl_iocdf_mod.o(.text+0x138e): undefined reference to `nf_open_'
cpl_iocdf_mod.o(.text+0x1616): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x1668): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o: In function `cpl_iocdf_mod_cpl_iocdf_close_':
cpl_iocdf_mod.o(.text+0x17c9): undefined reference to `nf_close_'
cpl_iocdf_mod.o: In function `cpl_iocdf_mod_cpl_iocdf_append_':
cpl_iocdf_mod.o(.text+0x1d7c): undefined reference to `nf_inq_dimid_'
cpl_iocdf_mod.o(.text+0x1eb6): undefined reference to `nf_redef_'
cpl_iocdf_mod.o(.text+0x1ef7): undefined reference to `nf_def_dim_'
cpl_iocdf_mod.o(.text+0x1f37): undefined reference to `nf_def_dim_'
cpl_iocdf_mod.o(.text+0x1f78): undefined reference to `nf_def_dim_'
cpl_iocdf_mod.o(.text+0x2236): undefined reference to `nf_def_var_'
cpl_iocdf_mod.o(.text+0x2299): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0x233f): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0x2384): undefined reference to `nf_enddef_'
cpl_iocdf_mod.o(.text+0x26ce): undefined reference to `nf_inq_varid_'
cpl_iocdf_mod.o(.text+0x28c1): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x2913): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x2a93): undefined reference to `nf_put_var_double_'
cpl_iocdf_mod.o(.text+0x2c13): undefined reference to `nf_redef_'
cpl_iocdf_mod.o(.text+0x2c41): undefined reference to `nf_inq_dimid_'
cpl_iocdf_mod.o(.text+0x2c6f): undefined reference to `nf_inq_dimid_'
cpl_iocdf_mod.o(.text+0x2c9c): undefined reference to `nf_inq_dimid_'
cpl_iocdf_mod.o(.text+0x2ef1): undefined reference to `nf_inq_varid_'
cpl_iocdf_mod.o(.text+0x318f): undefined reference to `nf_def_var_'
cpl_iocdf_mod.o(.text+0x3203): undefined reference to `nf_def_var_'
cpl_iocdf_mod.o(.text+0x3270): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0x3328): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0x337e): undefined reference to `nf_put_att_double_'
cpl_iocdf_mod.o(.text+0x346e): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x34e8): undefined reference to `nf_put_att_double_'
cpl_iocdf_mod.o(.text+0x35d8): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x3657): undefined reference to `nf_put_att_double_'
cpl_iocdf_mod.o(.text+0x3747): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x37c1): undefined reference to `nf_put_att_double_'
cpl_iocdf_mod.o(.text+0x38b1): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x3a34): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0x3b1a): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x3b83): undefined reference to `nf_enddef_'
cpl_iocdf_mod.o(.text+0x3ed9): undefined reference to `nf_inq_dimid_'
cpl_iocdf_mod.o(.text+0x3f04): undefined reference to `nf_inq_dimlen_'
cpl_iocdf_mod.o(.text+0x3f6b): undefined reference to `nf_get_var1_double_'
cpl_iocdf_mod.o(.text+0x40f8): undefined reference to `nf_inq_varid_'
cpl_iocdf_mod.o(.text+0x429a): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x42ec): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x4378): undefined reference to `nf_put_vara_double_'
cpl_iocdf_mod.o(.text+0x451a): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x456c): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x460f): undefined reference to `nf_inq_varid_'
cpl_iocdf_mod.o(.text+0x46ca): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x473a): undefined reference to `nf_put_vara_double_'
cpl_iocdf_mod.o(.text+0x47f5): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x4870): undefined reference to `nf_put_vara_double_'
cpl_iocdf_mod.o(.text+0x492b): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x4b78): undefined reference to `nf_enddef_'
cpl_iocdf_mod.o(.text+0x4f24): undefined reference to `nf_inq_varid_'
cpl_iocdf_mod.o(.text+0x5019): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x5185): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x5326): undefined reference to `nf_put_vara_double_'
cpl_iocdf_mod.o(.text+0x5410): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x5581): undefined reference to `nf_strerror_'
cpl_map_mod.o: In function `cpl_map_mod_cpl_map_read_':
cpl_map_mod.o(.text+0x4d62): undefined reference to `nf_open_'
cpl_map_mod.o(.text+0x4e1e): undefined reference to `nf_strerror_'
cpl_map_mod.o(.text+0x4e92): undefined reference to `nf_inq_dimid_'
cpl_map_mod.o(.text+0x4eba): undefined reference to `nf_inq_dimlen_'
cpl_map_mod.o(.text+0x4ee4): undefined reference to `nf_inq_dimid_'
cpl_map_mod.o(.text+0x4f0c): undefined reference to `nf_inq_dimlen_'
cpl_map_mod.o(.text+0x4f36): undefined reference to `nf_inq_dimid_'
cpl_map_mod.o(.text+0x4f5e): undefined reference to `nf_inq_dimlen_'
cpl_map_mod.o(.text+0x5728): undefined reference to `nf_inq_varid_'
cpl_map_mod.o(.text+0x5754): undefined reference to `nf_get_var_double_'
cpl_map_mod.o(.text+0x580c): undefined reference to `nf_strerror_'
cpl_map_mod.o(.text+0x587f): undefined reference to `nf_inq_varid_'
cpl_map_mod.o(.text+0x58a7): undefined reference to `nf_get_var_int_'
cpl_map_mod.o(.text+0x5968): undefined reference to `nf_strerror_'
cpl_map_mod.o(.text+0x59e1): undefined reference to `nf_inq_varid_'
cpl_map_mod.o(.text+0x5a09): undefined reference to `nf_get_var_int_'
cpl_map_mod.o(.text+0x5aca): undefined reference to `nf_strerror_'
cpl_map_mod.o(.text+0x5b43): undefined reference to `nf_inq_varid_'
cpl_map_mod.o(.text+0x5b6b): undefined reference to `nf_get_var_double_'
cpl_map_mod.o(.text+0x5c2c): undefined reference to `nf_strerror_'
cpl_map_mod.o(.text+0x5ca5): undefined reference to `nf_inq_varid_'
cpl_map_mod.o(.text+0x5cca): undefined reference to `nf_get_var_double_'
cpl_map_mod.o(.text+0x5d8b): undefined reference to `nf_strerror_'
cpl_map_mod.o(.text+0x5ddc): undefined reference to `nf_close_'
gmake: *** [/home2/e027chs/exe/new-dead-mod/cpl/cpl] Error 2

Do I need to change anything in the file /models/cpl/cpl6/main.F90 where cpl_iocdf occurs.

Thanking you in advance.
 
problem is with your netcdf library
----first let us assume your netcdf library works properly
but did you set env variable INC_NETCDF in your shell before using it in macros? because it is not defined in macros file
----Check if your netcdf library works properly by some small code available using it

yogeshkumkar said:
Dear Sir,
Thank you very much for your reply.
I have been struggling to get rid of the error which comes during ccsm build. I have set the SLIBS path in Macros.Linux as you said. This time different error messege has occured. The content of

ERROR: cpl.buildexe.csh failed, see cpl.buildexe.080526-093655
ERROR: cat /home2/e027chs/exe/new-dead-mod/cpl/cpl.buildexe.080526-093655 is like follows.

Mon May 26 09:36:58 KST 2008 /home2/e027chs/exe/new-dead-mod/cpl/cpl.buildexe.080526-093655
/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/bin/mpif90 -o /home2/e027chs/exe/new-dead-mod/cpl/cpl areafact_mod.o bitCheck_mod.o cpl_bundle_mod.o cpl_comm_mod.o cpl_const_mod.o cpl_contract_mod.o cpl_control_mod.o cpl_domain_mod.o cpl_fields_mod.o cpl_infobuf_mod.o cpl_interface_mod.o cpl_iobin_mod.o cpl_iocdf_mod.o cpl_kind_mod.o cpl_map_mod.o cpl_mct_mod.o data_mod.o diag_mod.o flux_mod.o frac_mod.o history_mod.o main.o merge_mod.o restart_mod.o shr_alarm_mod.o shr_cal_mod.o shr_const_mod.o shr_date_mod.o shr_file_mod.o shr_kind_mod.o shr_mpi_mod.o shr_msg_mod.o shr_orb_mod.o shr_sys_mod.o shr_timer_mod.o shr_vmath_fwrap.o shr_vmath_mod.o tStamp_mod.o timeCheck.o -L/opt/ksc/gnu/lib -lnetcdf -L/usr/lib -llapack -lblas -L/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/lib -lmpich -L/home2/e027chs/exe/new-dead-mod/lib -lesmf -lmct -lmpeu -lmph
cpl_iocdf_mod.o: In function `cpl_iocdf_mod_cpl_iocdf_create_':
cpl_iocdf_mod.o(.text+0x23e): undefined reference to `nf_create_'
cpl_iocdf_mod.o(.text+0x4c6): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x518): undefined reference to `nf_strerror_'
cpl_iocdf_mod.o(.text+0x61c): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0x7ab): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0x82d): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0x8af): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0x982): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0x9be): undefined reference to `nf_def_dim_'
cpl_iocdf_mod.o(.text+0xa0d): undefined reference to `nf_def_var_'
cpl_iocdf_mod.o(.text+0xa9c): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0xb2b): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0xbba): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0xc49): undefined reference to `nf_put_att_text_'
cpl_iocdf_mod.o(.text+0xc7f): undefined reference to `nf_def_dim_'
cpl_iocdf_mod.o(.text+0xcb2): undefined reference to `nf_inq_dimid_'
cpl_iocdf_mod.o(.text+0xcdf): undefined reference to `nf_inq_dimid_'
cpl_iocdf_mod.o(.text+0xd28): undefined reference to `nf_def_var_'
 
Thank you for your reply.

I have set INC_NETCDF and LIB_NETCDF in our shell before using it in macros.linux
for exmpl: our ~/.bashrc looks like


export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ksc/gnu/lib
export PATH=$PATH:/opt/ksc/gnu/bin:/opt/ksc/gnu/sbin
export PATH
LIBDWD_FORCE_CONTROLWORDS=1
export LIBDWD_FORCE_CONTROLWORDS

# PGI & MPICH
PGI=/opt/pgi/linux86/5.2
export PGI
PATH=$PGI/bin:$PGI/lib:$PGI/man:$PATH
export PATH
MPI=/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh

#MPI=/opt/mpich/1.2.5.2/ip/smp/pgi/ssh
export MPI
INC_MPI=$MPI/include
LIB_MPI=$MPI/lib
export INC_MPI LIB_MPI
PATH=$MPI/bin:$MPI/lib:$MPI/include:$MPI/man:$PATH
export PATH

# NetCDF
NETCDF=/opt/ksc/gnu
INC_NETCDF=$NETCDF/include
LIB_NETCDF=$NETCDF/lib
export NETCDF INC_NETCDF LIB_NETCDF
PATH=$NETCDF/bin:$NETCDF/include:$NETCDF/lib:$NETCDF/man:$PATH
export PATH


Moreover, I have changed Macros.Linux also because, the errors were coming related to Mfree, r8, -i4, -Kieee, -Mrecursive, -Mdalign, -Mextend. So I removed them. Now Macros.Linux is like:

ifeq ($(MACH),jazz)
INCLDIR := -I. -I/opt/ksc/gnu/include -I/usr/include -I${INCROOT} -I/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/include
SLIBS := -L/opt/ksc/gnu/lib -lnetcdf -L/usr/lib -llapack -lblas -L/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/lib -lmpich
else
INCLDIR := -I. -I$(INC_NETCDF) -I$(INCROOT) -I$(INC_MPI)
SLIBS := -L$(LIB_NETCDF) -lnetcdf -llapack -lblas
endif
ULIBS := -L$(LIBROOT) -lesmf -lmct -lmpeu -lmph
CPP := NONE
CPPFLAGS := -DLINUX -DPGF90 -DNO_SHR_VMATH
CPPDEFS := -DLINUX
CC := mpicc
#CC := /opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/bin/mpicc
CFLAGS := -c
ifeq ($(CC),pgcc)
CFLAGS += -fast
else
CFLAGS += -DUSE_GCC
endif
FIXEDFLAGS := NONE
#FREEFLAGS := -Mfree
FREEFLAGS :=
FC := mpif90
#FC := /opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/bin/mpif90
#FFLAGS := -c -r8 -i4 -Kieee -Mrecursive -Mdalign -Mextend
FFLAGS := -c -i4
# -g -Ktrap=fp -Mbounds
MOD_SUFFIX := mod
LD := $(FC)
#LDFLAGS := -L/usr/local/gm/lib -lgm -lpthread
#LDFLAGS := -L/usr/local/gm/lib -lgm
ifeq ($(CC),gcc)
LDFLAGS += -g77libs="-L/opt/pgi/linux86/5.2/lib -lpgf90 -lpgf90rtl -lpgftnrtl -lpgc"
endif
AR := ar


but still new error comes. it shows

Mon May 26 23:04:22 KST 2008 /ytmp/e027chs/yogesh/ccsm3_0.dead/zbdead/cpl/cpl.buildexe.080526-230410
mpif90 -I. -I/opt/ksc/gnu/include -I/usr/include -I/ytmp/e027chs/yogesh/ccsm3_0.dead/zbdead/lib/include -I/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/include -I. -I/ytmp/e027chs/yogesh/ccsm3_0.dead/zbdead/SourceMods/src.cpl -I/ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/cpl/cpl6 -I/ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/csm_share -I/ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/csm_share/shr -I/ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/csm_share/cpl -c -i4 -DLINUX -DPGF90 -DNO_SHR_VMATH -DLINUX /ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/csm_share/shr/shr_mpi_mod.F90
/ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/csm_share/shr/shr_mpi_mod.F90:70: #include expects "fname" or
Preprocessing failed.
gmake: *** [shr_mpi_mod.o] Error 1


Is it related to 32/64 bit machine or bash shell? Please give suggestions.
Sincerely,
Yogesh.
 
First of all, as I know, all of CCSM3 building scripts are running in c-shell or tc-sell. I don't know if you can do the environemnat setting in bashrc, though.
At least, you might need to create a ".cshrc" file, put all CCSM3 environment variables in, and run it before running any CCSM3 scripts.
I don't even know how to actually do it. If you don't wanna be bothered, you can ask your administrator to change your environmenat to c- or tc-shell.
The ".cshec" file will be read eveytime when you are login to the system.

If the problem is not on the shell, it should be (or must be) on your netCDF setting. Let's get back to look at your NetCDF library setting.
I don't know what version you are using, though.

%cd /opt/ksc/gnu/lib
%ls libnetcdf*

What do you see?
Can you see both libnetcdf.a and libnetcdff.a? If so, you have to add "-lnetcdff" in your SLIBS.
Your SLIBS will be:

SLIBS := -L/opt/ksc/gnu/lib -lnetcdf -lnetcdff -L/usr/lib -llapack -lblas -L/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/lib -lmpich


Please return "-Mfree, r8, -i4, -Kieee, -Mrecursive, -Mdalign, -Mextend" to where they should be origionally. It's not a good idea to change anything before you have solved the previous problem.


So, here is you should do:
1) Turn your shell to C/TC-shell, and convert the environemnt variable setting to C/TC.

2) Check out your NetCDF library.

3) If the problem still there (cashed at cpl), I would like to see your mct.buildlib.xxxx. Maybe it's also a good time to upgrade you mct library.

Here is my cpl.buildexe.xxxxx.
Hopefully, that helps.


Building dependency for timeCheck.d
Building dependency for tStamp_mod.d
Building dependency for shr_vmath_mod.d
Building dependency for shr_vmath_fwrap.d
Building dependency for shr_timer_mod.d
Building dependency for shr_sys_mod.d
Building dependency for shr_orb_mod.d
Building dependency for shr_msg_mod.d
Building dependency for shr_mpi_mod.d
Building dependency for shr_kind_mod.d
Building dependency for shr_file_mod.d
Building dependency for shr_date_mod.d
Building dependency for shr_const_mod.d
Building dependency for shr_cal_mod.d
Building dependency for shr_alarm_mod.d
Building dependency for restart_mod.d
Building dependency for merge_mod.d
Building dependency for main.d
Building dependency for history_mod.d
Building dependency for frac_mod.d
Building dependency for flux_mod.d
Building dependency for diag_mod.d
Building dependency for data_mod.d
Building dependency for cpl_mct_mod.d
Building dependency for cpl_map_mod.d
Building dependency for cpl_kind_mod.d
Building dependency for cpl_iocdf_mod.d
Building dependency for cpl_iobin_mod.d
Building dependency for cpl_interface_mod.d
Building dependency for cpl_infobuf_mod.d
Building dependency for cpl_fields_mod.d
Building dependency for cpl_domain_mod.d
Building dependency for cpl_control_mod.d
Building dependency for cpl_contract_mod.d
Building dependency for cpl_const_mod.d
Building dependency for cpl_comm_mod.d
Building dependency for cpl_bundle_mod.d
Building dependency for bitCheck_mod.d
Building dependency for areafact_mod.d
mpif90 -I. -I/usr/local/netcdf-3.6.2/include -I/usr/include -I/home/odden/lib/include -I/usr/local/mpi/mvapich-0.9.8-pgi/include -I/usr/local/pgi/linux86-64/7.0-4/include -I. -I/home/odden/tst/TER
.01a.T31_gx3v5.B.glenn.203501/SourceMods/src.cpl -I/d/odden/ccsm3_0/models/cpl/cpl6 -I/d/odden/ccsm3_0/models/csm_share -I/d/odden/ccsm3_0/models/csm_share/shr -I/d/odden/ccsm3_0/models/csm_sha
re/cpl -c -r8 -i4 -Kieee -Mdalign -Mextend -Mfree -DLINUX -DPGF90 -DNO_SHR_VMATH -DLINUX /d/odden/ccsm3_0/models/csm_share/shr/shr_kind_mod.F90
mpif90 -I. -I/usr/local/netcdf-3.6.2/include -I/usr/include -I/home/odden/lib/include -I/usr/local/mpi/mvapich-0.9.8-pgi/include -I/usr/local/pgi/linux86-64/7.0-4/include -I. -I/home/odden/tst/TER
.01a.T31_gx3v5.B.glenn.203501/SourceMods/src.cpl -I/d/odden/ccsm3_0/models/cpl/cpl6 -I/d/odden/ccsm3_0/models/csm_share -I/d/odden/ccsm3_0/models/csm_share/shr -I/d/odden/ccsm3_0/models/csm_sha
re/cpl -c -r8 -i4 -Kieee -Mdalign -Mextend -Mfree -DLINUX -DPGF90 -DNO_SHR_VMATH -DLINUX /d/odden/ccsm3_0/models/csm_share/shr/shr_mpi_mod.F90




yogeshkumkar said:
Thank you for your reply.

I have set INC_NETCDF and LIB_NETCDF in our shell before using it in macros.linux
for exmpl: our ~/.bashrc looks like


export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ksc/gnu/lib
export PATH=$PATH:/opt/ksc/gnu/bin:/opt/ksc/gnu/sbin
export PATH
LIBDWD_FORCE_CONTROLWORDS=1
export LIBDWD_FORCE_CONTROLWORDS

# PGI & MPICH
PGI=/opt/pgi/linux86/5.2
export PGI
PATH=$PGI/bin:$PGI/lib:$PGI/man:$PATH
export PATH
MPI=/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh

#MPI=/opt/mpich/1.2.5.2/ip/smp/pgi/ssh
export MPI
INC_MPI=$MPI/include
LIB_MPI=$MPI/lib
export INC_MPI LIB_MPI
PATH=$MPI/bin:$MPI/lib:$MPI/include:$MPI/man:$PATH
export PATH

# NetCDF
NETCDF=/opt/ksc/gnu
INC_NETCDF=$NETCDF/include
LIB_NETCDF=$NETCDF/lib
export NETCDF INC_NETCDF LIB_NETCDF
PATH=$NETCDF/bin:$NETCDF/include:$NETCDF/lib:$NETCDF/man:$PATH
export PATH


Moreover, I have changed Macros.Linux also because, the errors were coming related to Mfree, r8, -i4, -Kieee, -Mrecursive, -Mdalign, -Mextend. So I removed them. Now Macros.Linux is like:

ifeq ($(MACH),jazz)
INCLDIR := -I. -I/opt/ksc/gnu/include -I/usr/include -I${INCROOT} -I/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/include
SLIBS := -L/opt/ksc/gnu/lib -lnetcdf -L/usr/lib -llapack -lblas -L/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/lib -lmpich
else
INCLDIR := -I. -I$(INC_NETCDF) -I$(INCROOT) -I$(INC_MPI)
SLIBS := -L$(LIB_NETCDF) -lnetcdf -llapack -lblas
endif
ULIBS := -L$(LIBROOT) -lesmf -lmct -lmpeu -lmph
CPP := NONE
CPPFLAGS := -DLINUX -DPGF90 -DNO_SHR_VMATH
CPPDEFS := -DLINUX
CC := mpicc
#CC := /opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/bin/mpicc
CFLAGS := -c
ifeq ($(CC),pgcc)
CFLAGS += -fast
else
CFLAGS += -DUSE_GCC
endif
FIXEDFLAGS := NONE
#FREEFLAGS := -Mfree
FREEFLAGS :=
FC := mpif90
#FC := /opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/bin/mpif90
#FFLAGS := -c -r8 -i4 -Kieee -Mrecursive -Mdalign -Mextend
FFLAGS := -c -i4
# -g -Ktrap=fp -Mbounds
MOD_SUFFIX := mod
LD := $(FC)
#LDFLAGS := -L/usr/local/gm/lib -lgm -lpthread
#LDFLAGS := -L/usr/local/gm/lib -lgm
ifeq ($(CC),gcc)
LDFLAGS += -g77libs="-L/opt/pgi/linux86/5.2/lib -lpgf90 -lpgf90rtl -lpgftnrtl -lpgc"
endif
AR := ar


but still new error comes. it shows

Mon May 26 23:04:22 KST 2008 /ytmp/e027chs/yogesh/ccsm3_0.dead/zbdead/cpl/cpl.buildexe.080526-230410
mpif90 -I. -I/opt/ksc/gnu/include -I/usr/include -I/ytmp/e027chs/yogesh/ccsm3_0.dead/zbdead/lib/include -I/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/include -I. -I/ytmp/e027chs/yogesh/ccsm3_0.dead/zbdead/SourceMods/src.cpl -I/ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/cpl/cpl6 -I/ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/csm_share -I/ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/csm_share/shr -I/ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/csm_share/cpl -c -i4 -DLINUX -DPGF90 -DNO_SHR_VMATH -DLINUX /ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/csm_share/shr/shr_mpi_mod.F90
/ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/csm_share/shr/shr_mpi_mod.F90:70: #include expects "fname" or
Preprocessing failed.
gmake: *** [shr_mpi_mod.o] Error 1


Is it related to 32/64 bit machine or bash shell? Please give suggestions.
Sincerely,
Yogesh.
 
First of all, as I know, all of CCSM3 building scripts are running in c-shell or tc-sell. I don't know if you can do the environemnat setting in bashrc, though.
At least, you might need to create a ".cshrc" file, put all CCSM3 environment variables in, and run it before running any CCSM3 scripts.
I don't even know how to actually do it. If you don't wanna be bothered, you can ask your administrator for changing your shell to c- or tc-shell.
The ".cshec" file will be read eveytime when you are login to the system.

If the problem is not on the shell, it should be (or must be) on your netCDF setting. Let's get back to look at your NetCDF library setting.
I don't know what version you are using, though.

%cd /opt/ksc/gnu/lib
%ls libnetcdf*

What do you see?
Can you see both libnetcdf.a and libnetcdff.a? If so, you have to add "-lnetcdff" in your SLIBS.
Your SLIBS will be:

SLIBS := -L/opt/ksc/gnu/lib -lnetcdf -lnetcdff -L/usr/lib -llapack -lblas -L/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/lib -lmpich


Please return "-Mfree, r8, -i4, -Kieee, -Mrecursive, -Mdalign, -Mextend" to where they should be origionally. It's not a good idea to change anything before you got the previous problem done.


So, here is you should do:
1) Turn your shell to C/TC-shell, and convert the environemnt variable setting to C/TC before building the model.

2) Check your NetCDF library.

3) If the problem still there (cash at cpl component), I would like to see your mct.buildlib.xxxx. Maybe it's also a good time to upgrade you mct library.

Here is the header of my cpl.buildexe.xxxxx.
Hopefully, that helps.


Building dependency for timeCheck.d
Building dependency for tStamp_mod.d
Building dependency for shr_vmath_mod.d
Building dependency for shr_vmath_fwrap.d
Building dependency for shr_timer_mod.d
Building dependency for shr_sys_mod.d
Building dependency for shr_orb_mod.d
Building dependency for shr_msg_mod.d
Building dependency for shr_mpi_mod.d
Building dependency for shr_kind_mod.d
Building dependency for shr_file_mod.d
Building dependency for shr_date_mod.d
Building dependency for shr_const_mod.d
Building dependency for shr_cal_mod.d
Building dependency for shr_alarm_mod.d
Building dependency for restart_mod.d
Building dependency for merge_mod.d
Building dependency for main.d
Building dependency for history_mod.d
Building dependency for frac_mod.d
Building dependency for flux_mod.d
Building dependency for diag_mod.d
Building dependency for data_mod.d
Building dependency for cpl_mct_mod.d
Building dependency for cpl_map_mod.d
Building dependency for cpl_kind_mod.d
Building dependency for cpl_iocdf_mod.d
Building dependency for cpl_iobin_mod.d
Building dependency for cpl_interface_mod.d
Building dependency for cpl_infobuf_mod.d
Building dependency for cpl_fields_mod.d
Building dependency for cpl_domain_mod.d
Building dependency for cpl_control_mod.d
Building dependency for cpl_contract_mod.d
Building dependency for cpl_const_mod.d
Building dependency for cpl_comm_mod.d
Building dependency for cpl_bundle_mod.d
Building dependency for bitCheck_mod.d
Building dependency for areafact_mod.d
mpif90 -I. -I/usr/local/netcdf-3.6.2/include -I/usr/include -I/home/odden/lib/include -I/usr/local/mpi/mvapich-0.9.8-pgi/include -I/usr/local/pgi/linux86-64/7.0-4/include -I. -I/home/odden/tst/TER
.01a.T31_gx3v5.B.glenn.203501/SourceMods/src.cpl -I/d/odden/ccsm3_0/models/cpl/cpl6 -I/d/odden/ccsm3_0/models/csm_share -I/d/odden/ccsm3_0/models/csm_share/shr -I/d/odden/ccsm3_0/models/csm_sha
re/cpl -c -r8 -i4 -Kieee -Mdalign -Mextend -Mfree -DLINUX -DPGF90 -DNO_SHR_VMATH -DLINUX /d/odden/ccsm3_0/models/csm_share/shr/shr_kind_mod.F90
mpif90 -I. -I/usr/local/netcdf-3.6.2/include -I/usr/include -I/home/odden/lib/include -I/usr/local/mpi/mvapich-0.9.8-pgi/include -I/usr/local/pgi/linux86-64/7.0-4/include -I. -I/home/odden/tst/TER
.01a.T31_gx3v5.B.glenn.203501/SourceMods/src.cpl -I/d/odden/ccsm3_0/models/cpl/cpl6 -I/d/odden/ccsm3_0/models/csm_share -I/d/odden/ccsm3_0/models/csm_share/shr -I/d/odden/ccsm3_0/models/csm_sha
re/cpl -c -r8 -i4 -Kieee -Mdalign -Mextend -Mfree -DLINUX -DPGF90 -DNO_SHR_VMATH -DLINUX /d/odden/ccsm3_0/models/csm_share/shr/shr_mpi_mod.F90




yogeshkumkar said:
Thank you for your reply.

I have set INC_NETCDF and LIB_NETCDF in our shell before using it in macros.linux
for exmpl: our ~/.bashrc looks like


export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ksc/gnu/lib
export PATH=$PATH:/opt/ksc/gnu/bin:/opt/ksc/gnu/sbin
export PATH
LIBDWD_FORCE_CONTROLWORDS=1
export LIBDWD_FORCE_CONTROLWORDS

# PGI & MPICH
PGI=/opt/pgi/linux86/5.2
export PGI
PATH=$PGI/bin:$PGI/lib:$PGI/man:$PATH
export PATH
MPI=/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh

#MPI=/opt/mpich/1.2.5.2/ip/smp/pgi/ssh
export MPI
INC_MPI=$MPI/include
LIB_MPI=$MPI/lib
export INC_MPI LIB_MPI
PATH=$MPI/bin:$MPI/lib:$MPI/include:$MPI/man:$PATH
export PATH

# NetCDF
NETCDF=/opt/ksc/gnu
INC_NETCDF=$NETCDF/include
LIB_NETCDF=$NETCDF/lib
export NETCDF INC_NETCDF LIB_NETCDF
PATH=$NETCDF/bin:$NETCDF/include:$NETCDF/lib:$NETCDF/man:$PATH
export PATH


Moreover, I have changed Macros.Linux also because, the errors were coming related to Mfree, r8, -i4, -Kieee, -Mrecursive, -Mdalign, -Mextend. So I removed them. Now Macros.Linux is like:

ifeq ($(MACH),jazz)
INCLDIR := -I. -I/opt/ksc/gnu/include -I/usr/include -I${INCROOT} -I/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/include
SLIBS := -L/opt/ksc/gnu/lib -lnetcdf -L/usr/lib -llapack -lblas -L/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/lib -lmpich
else
INCLDIR := -I. -I$(INC_NETCDF) -I$(INCROOT) -I$(INC_MPI)
SLIBS := -L$(LIB_NETCDF) -lnetcdf -llapack -lblas
endif
ULIBS := -L$(LIBROOT) -lesmf -lmct -lmpeu -lmph
CPP := NONE
CPPFLAGS := -DLINUX -DPGF90 -DNO_SHR_VMATH
CPPDEFS := -DLINUX
CC := mpicc
#CC := /opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/bin/mpicc
CFLAGS := -c
ifeq ($(CC),pgcc)
CFLAGS += -fast
else
CFLAGS += -DUSE_GCC
endif
FIXEDFLAGS := NONE
#FREEFLAGS := -Mfree
FREEFLAGS :=
FC := mpif90
#FC := /opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/bin/mpif90
#FFLAGS := -c -r8 -i4 -Kieee -Mrecursive -Mdalign -Mextend
FFLAGS := -c -i4
# -g -Ktrap=fp -Mbounds
MOD_SUFFIX := mod
LD := $(FC)
#LDFLAGS := -L/usr/local/gm/lib -lgm -lpthread
#LDFLAGS := -L/usr/local/gm/lib -lgm
ifeq ($(CC),gcc)
LDFLAGS += -g77libs="-L/opt/pgi/linux86/5.2/lib -lpgf90 -lpgf90rtl -lpgftnrtl -lpgc"
endif
AR := ar


but still new error comes. it shows

Mon May 26 23:04:22 KST 2008 /ytmp/e027chs/yogesh/ccsm3_0.dead/zbdead/cpl/cpl.buildexe.080526-230410
mpif90 -I. -I/opt/ksc/gnu/include -I/usr/include -I/ytmp/e027chs/yogesh/ccsm3_0.dead/zbdead/lib/include -I/opt/mpich/1.2.5..10/gm-2.0.12-2.4.20-28.7smp-i686/smp/pgi/ssh/include -I. -I/ytmp/e027chs/yogesh/ccsm3_0.dead/zbdead/SourceMods/src.cpl -I/ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/cpl/cpl6 -I/ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/csm_share -I/ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/csm_share/shr -I/ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/csm_share/cpl -c -i4 -DLINUX -DPGF90 -DNO_SHR_VMATH -DLINUX /ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/csm_share/shr/shr_mpi_mod.F90
/ytmp/e027chs/yogesh/ccsm3_0.dead/ccsm3.0/models/csm_share/shr/shr_mpi_mod.F90:70: #include expects "fname" or
Preprocessing failed.
gmake: *** [shr_mpi_mod.o] Error 1


Is it related to 32/64 bit machine or bash shell? Please give suggestions.
Sincerely,
Yogesh.
 
Top