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 in building CESM on Blegene

Hi

I am trying to build CESM on Bluegene/L with Linux OS system. I have choose the machine as prototype_frost. I have compiled all the components successfully and and getting error at the last as below:
1501-510 Compilation successful for file ccsm_driver.F90.
blrts_xlf90 -o /home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/scripts/casgbala/test1/run/ccsm.exe ccsm_driver.o map_atmatm_mct.o map_atmice_mct.o map_atmlnd_mct.o map_atmocn_mct.o map_glcglc_mct.o map_iceice_mct.o map_iceocn_mct.o map_lndlnd_mct.o map_ocnocn_mct.o map_rofocn_mct.o map_rofrof_mct.o map_snoglc_mct.o map_snosno_mct.o mrg_x2a_mct.o mrg_x2g_mct.o mrg_x2i_mct.o mrg_x2l_mct.o mrg_x2o_mct.o mrg_x2s_mct.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_rearr_mod.o seq_rest_mod.o -L/home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/scripts/casgbala/test1/lib -latm -llnd -lice -locn -lglc -L/home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/scripts/casgbala/test1/lib -lcsm_share -lmct -lmpeu -lpio -L/opt/ibmmath/essl/4.2/lib -lmass -lmassv -L/contrib/memmon2 -lmemmon2 -L/home/caos2/casgbala/dev_blugene/netcdf_blugen/netcdf-3.6.3_installed/lib -lnetcdf -L/bgl/BlueLight/ppcfloor/bglsys/lib -lmpich.rts -lmsglayer.rts -lrts.rts -ldevices.rts -Wl,--allow-multiple-definition
/bgl/BlueLight/ppcfloor/blrts-gnu/powerpc-bgl-blrts-gnu/bin/ld: cannot find -lmemmon2
gmake: *** [/home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/scripts/casgbala/test1/run/ccsm.exe] Error 1

It says cannot find -lmemmon2,and there is no such /contrib/ directory in our system, also my system admin says its not a Blugene/L system library..

I am not able to figure out ..
Please clarify if any one knows about the problem...

Thanks.
Dev
 

jedwards

CSEG and Liaisons
Staff member
Try removing -lmemmon2 and adding the flag -bloadmap:map to LDFLAGS in the Macros.prototype_frost file in your case directory.

When you rebuild you will get a file called map that will indicate the place in the code where that library is being used at which point you can probably just comment it out.
 
Hi

Thanks for the suggestion. I removed -lmemmon2 and added the flag -bloadmap:map to LDFLAGS.

After rebuld, I am getting the following error: I am not able to find map file:

1501-510 Compilation successful for file ccsm_driver.F90.
blrts_xlf90 -o /home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/scripts/casgbala/test1/run/ccsm.exe ccsm_driver.o map_atmatm_mct.o map_atmice_mct.o map_atmlnd_mct.o map_atmocn_mc
t.o map_glcglc_mct.o map_iceice_mct.o map_iceocn_mct.o map_lndlnd_mct.o map_ocnocn_mct.o map_rofocn_mct.o map_rofrof_mct.o map_snoglc_mct.o map_snosno_mct.o mrg_x2a_mct.o mrg_x2g_mct.o mrg_x2
i_mct.o mrg_x2l_mct.o mrg_x2o_mct.o mrg_x2s_mct.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_rearr_mod.o seq_rest_mod.o -L/home/caos2/ca
sgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/scripts/casgbala/test1/lib -latm -llnd -lice -locn -lglc -L/home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/scripts/casgbala/test1
/lib -lcsm_share -lmct -lmpeu -lpio -L/opt/ibmmath/essl/4.2/lib -lmass -lmassv -L/contrib/memmon2 -L/home/caos2/casgbala/dev_blugene/netcdf_blugen/netcdf-3.6.3_installed/lib -lnetcdf -L/bg
l/BlueLight/ppcfloor/bglsys/lib -lmpich.rts -lmsglayer.rts -lrts.rts -ldevices.rts -Wl,--allow-multiple-definition -bloadmap:map
/bgl/BlueLight/ppcfloor/blrts-gnu/powerpc-bgl-blrts-gnu/bin/ld: invalid BFD target `loadmap:map'
gmake: *** [/home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/scripts/casgbala/test1/run/ccsm.exe] Error 1

Thanks.
 

jedwards

CSEG and Liaisons
Staff member
Sorry - The machine frost is down and so I haven't been able to test what I am telling you. Try once more without the -bloadmap:map flag (and still without -lmemon2) - hopefully I'll be able to get on frost later today and have a look.
 
Hi,

I removed both -bloadmap:map flag and -lmemon2, But much error as below: Our system admin says "bloadmap option works on AIX(regatta), it will not work linux (BGL) system": Please guide me how to go.......

Thu Apr 28 21:38:06 IST 2011 /home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/scripts/casgbala/test1/run/ccsm.bldlog.110428-213429
-------------------------------------------------------------------------
Building a single executable version of CCSM
-------------------------------------------------------------------------
cat: Srcfiles: No such file or directory

1501-510 Compilation successful for file ccsm_driver.F90.
blrts_xlf90 -o /home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/scripts/casgbala/test1/run/ccsm.exe ccsm_driver.o map_atmatm_mct.o map_atmice_mct.o map_atmlnd_mct.o map_atmocn_mct.o map_glcglc_mct.o map_iceice_mct.o map_iceocn_mct.o map_lndlnd_mct.o map_ocnocn_mct.o map_rofocn_mct.o map_rofrof_mct.o map_snoglc_mct.o map_snosno_mct.o mrg_x2a_mct.o mrg_x2g_mct.o mrg_x2i_mct.o mrg_x2l_mct.o mrg_x2o_mct.o mrg_x2s_mct.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_rearr_mod.o seq_rest_mod.o -L/home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/scripts/casgbala/test1/lib -latm -llnd -lice -locn -lglc -L/home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/scripts/casgbala/test1/lib -lcsm_share -lmct -lmpeu -lpio -L/opt/ibmmath/essl/4.2/lib -lmass -lmassv -L/contrib/memmon2 -L/home/caos2/casgbala/dev_blugene/netcdf_blugen/netcdf-3.6.3_installed/lib -lnetcdf -L/bgl/BlueLight/ppcfloor/bglsys/lib -lmpich.rts -lmsglayer.rts -lrts.rts -ldevices.rts -Wl,--allow-multiple-definition
ccsm_driver.o: In function `ccsm_driver':
/home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/models/drv/driver/ccsm_driver.F90:2: undefined reference to `__func_trace_enter'
ccsm_driver.o: In function `seq_ccsm_printlogheader':

/home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/models/csm_share/shr/shr_ncread_mod.F90:426: undefined reference to `__func_trace_exit'
/home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/scripts/casgbala/test1/lib/libcsm_share.a(shr_ncread_mod.o): In function `shr_ncread_vardimsizename':
/home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/models/csm_share/shr/shr_ncread_mod.F90:229: undefined reference to `__func_trace_enter'
/home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/models/csm_share/shr/shr_ncread_mod.F90:259: undefined reference to `__func_trace_exit'
/home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/scripts/casgbala/test1/lib/libpio.a(pionfput_mod.o): In function `__pionfput_mod_NMOD_put_var_0d_text':
pionfput_mod.F90:(.text+0x216c): undefined reference to `nf_put_vars_text'
pionfput_mod.F90:(.text+0x21c4): undefined reference to `nf_put_vars_text'
pionfput_mod.F90:(.text+0x2230): undefined reference to `nf_put_vars_text'
/home/caos2/casgbala/dev_blugene/netcdf_blugen/netcdf-3.6.3_installed/lib/libnetcdf.a(posixio.o): In function `fgrow':
/home/caos2/casgbala/dev_blugene/netcdf_blugen/netcdf-3.6.3/libsrc/posixio.c:133: undefined reference to `__errno_location'
/home/caos2/casgbala/dev_blugene/netcdf_blugen/netcdf-3.6.3/libsrc/posixio.c:142: undefined reference to `__errno_location'
/home/caos2/casgbala/dev_blugene/netcdf_blugen/netcdf-3.6.3/libsrc/posixio.c:144: undefined reference to `__errno_location'
/home/caos2/casgbala/dev_blugene/netcdf_blugen/netcdf-3.6.3/libsrc/posixio.c:146: undefined reference to `__errno_location'
/home/caos2/casgbala/dev_blugene/netcdf_blugen/netcdf-3.6.3/libsrc/posixio.c:148: undefined reference to `__errno_location'
/home/caos2/casgbala/dev_blugene/netcdf_blugen/netcdf-3.6.3_installed/lib/libnetcdf.a(posixio.o):/home/caos2/casgbala/dev_blugene/netcdf_blugen/netcdf-3.6.3/libsrc/posixio.c:1474: more undefined references to `__errno_location' follow
gmake: *** [/home/caos2/casgbala/dev_blugene/CESM102/cesm_intel/cesm1_0_2/scripts/casgbala/test1/run/ccsm.exe] Error 1
 

jedwards

CSEG and Liaisons
Staff member
The functions __func_trace_exit __func_trace_enter seem to indicate that the -qdebug=function_trace flag was used and so you should include -lmpitrace_f or remove that flag. The other __errno_location should be in libc but seems to indicate a problem with your netcdf build.
 
I too guess its netCDF problem. I compiled netCDF as below:

The compilers used are:

setenv PATH /opt/ibmcmp/xlf/bg/11.1/bin/blrts_xlf90
setenv PATH /opt/ibmcmp/vac/bg/9.0/bin/blrts_xlc
setenv PATH /opt/ibmcmp/vacpp/bg/9.0/bin/blrts_xlC

set FC=blrts_xlf90
set CC=blrts_xlc
set CXX=blrts_xlC
set F90=blrts_xlf90
set F77=blrts_xlf
cd netcdf-3.6.3
./configure --enable-f90 --prefix=/home/caos2/casgbala/dev_blugene/netcdf_blugen/netcdf-3.6.3_installed/ FCFLAGS=-qsuffix=f=f90 -qextname FFLAGS=-qextname CPPFLAGS=-DIBMR2Fortran -Dextname F90FLAGS=-qsuffix=f=f90

and then I got warning message
make[1]: warning: Clock skew detected. Your build may be incomplete.
make[1]: Leaving directory `/home/caos2/casgbala/dev_blugene/netcdf_blugen/netcdf_crosscompile/netcdf-3.6.3'
make: warning: Clock skew detected. Your build may be incomplete.

Am I done right netCDF compilation?
 
Top