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

relocation truncated to fit: R_X86_64_32 against `.bss'

Gary

Gary Cui
New Member
platform: centOS 7
CESM version: 1_2_2
complier: gnu mpich
This error occurred when I was building a simple case:
[root@localhost scripts]# ./create_newcase -case /home/gary/CESM/cesm1_2_2/case -mach cyz -compset X -res f19_g16
...
[root@localhost case]# ./cesm_setup
...
[root@localhost case]# ./case.build
following:
-------------------------------------------------------------------------
CESM BUILDNML SCRIPT STARTING
- To prestage restarts, untar a restart.tar file into /home/gary/CESM/cesm1_2_2/run
Use of qw(...) as parentheses is deprecated at /home/gary/CESM/cesm1_2_2/models/drv/bld/build-namelist line 784.
infile is /home/gary/CESM/cesm1_2_2/case/Buildconf/cplconf/cesm_namelist
CESM BUILDNML SCRIPT HAS FINISHED SUCCESSFULLY
-------------------------------------------------------------------------
-------------------------------------------------------------------------
CESM PRESTAGE SCRIPT STARTING
- Case input data directory, DIN_LOC_ROOT, is /home/gary/CESM/cesm1_2_2/run/input_data
- Checking the existence of input datasets in DIN_LOC_ROOT
CESM PRESTAGE SCRIPT HAS FINISHED SUCCESSFULLY
-------------------------------------------------------------------------
-------------------------------------------------------------------------
CESM BUILDEXE SCRIPT STARTING
rm: No match.
COMPILER is gnu
- Build Libraries: mct gptl pio csm_share
Mon Jul 27 22:09:47 CST 2020 /home/gary/CESM/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/mct.bldlog.200727-220947
Mon Jul 27 22:09:47 CST 2020 /home/gary/CESM/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/gptl.bldlog.200727-220947
Mon Jul 27 22:09:47 CST 2020 /home/gary/CESM/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/pio.bldlog.200727-220947
Mon Jul 27 22:09:48 CST 2020 /home/gary/CESM/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/csm_share.bldlog.200727-220947
Mon Jul 27 22:09:48 CST 2020 /home/gary/CESM/cesm1_2_2/build/atm.bldlog.200727-220947
Mon Jul 27 22:09:48 CST 2020 /home/gary/CESM/cesm1_2_2/build/lnd.bldlog.200727-220947
Mon Jul 27 22:09:48 CST 2020 /home/gary/CESM/cesm1_2_2/build/ice.bldlog.200727-220947
Mon Jul 27 22:09:48 CST 2020 /home/gary/CESM/cesm1_2_2/build/ocn.bldlog.200727-220947
Mon Jul 27 22:09:48 CST 2020 /home/gary/CESM/cesm1_2_2/build/glc.bldlog.200727-220947
Mon Jul 27 22:09:48 CST 2020 /home/gary/CESM/cesm1_2_2/build/wav.bldlog.200727-220947
Mon Jul 27 22:09:48 CST 2020 /home/gary/CESM/cesm1_2_2/build/rof.bldlog.200727-220947
Mon Jul 27 22:09:48 CST 2020 /home/gary/CESM/cesm1_2_2/build/cesm.bldlog.200727-220947
ERROR: cesm.buildexe.csh failed, see /home/gary/CESM/cesm1_2_2/build/cesm.bldlog.200727-220947
ERROR: cat /home/gary/CESM/cesm1_2_2/build/cesm.bldlog.200727-220947
/home/gary/CESM/cesm1_2_2/build/cesm.bldlog.200727-220947 is as follows:
-------------------------------------------------------------------------
Building a single executable version of CESM
-------------------------------------------------------------------------
/home/gary/CESM/cesm1_2_2/case/Tools/mkSrcfiles
cp -f /home/gary/CESM/cesm1_2_2/build/cesm/obj/Filepath /home/gary/CESM/cesm1_2_2/build/cesm/obj/Deppath
/home/gary/CESM/cesm1_2_2/case/Tools/mkDepends Deppath Srcfiles > /home/gary/CESM/cesm1_2_2/build/cesm/obj/Depends
/home/gary/CESM/cesm1_2_2/case/Tools/mkSrcfiles
mpif90 -o /home/gary/CESM/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/home/gary/CESM/cesm1_2_2/build/lib/ -latm -L/home/gary/CESM/cesm1_2_2/build/lib/ -lice -L/home/gary/CESM/cesm1_2_2/build/lib/ -llnd -L/home/gary/CESM/cesm1_2_2/build/lib/ -locn -L/home/gary/CESM/cesm1_2_2/build/lib/ -lrof -L/home/gary/CESM/cesm1_2_2/build/lib/ -lglc -L/home/gary/CESM/cesm1_2_2/build/lib/ -lwav -L/home/gary/CESM/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share -lcsm_share -L/home/gary/CESM/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/lib -lpio -lgptl -lmct -lmpeu -L/home/gary/CESM/netcdf/gcc_4.8.5/Packages/netcdf/4.7.2/lib -lnetcdf -lnetcdff -L/home/gary/CESM/pnetcdf/lib -lpnetcdf -L/home/gary/CESM/mpich/lib -lmpich
/home/gary/CESM/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/lib/libpio.a(pio_msg_callbacks.F90.o): In function `pio_callback_handler_':
pio_msg_callbacks.F90:(.text+0x3d4): relocation truncated to fit: R_X86_64_32S against `.bss'
pio_msg_callbacks.F90:(.text+0x4a7): relocation truncated to fit: R_X86_64_32S against `.bss'
/home/gary/CESM/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/lib/libpio.a(pionfget_mod.F90.o): In function `__pionfget_mod_MOD_get_var1_text':
pionfget_mod.F90:(.text+0x21290): relocation truncated to fit: R_X86_64_32 against `.bss'
pionfget_mod.F90:(.text+0x212b6): relocation truncated to fit: R_X86_64_PC32 against `.bss'
pionfget_mod.F90:(.text+0x2136f): relocation truncated to fit: R_X86_64_32 against `.bss'
/home/gary/CESM/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/lib/libpio.a(piodarray.F90.o): In function `__piodarray_MOD_darray_write_complete':
piodarray.F90:(.text+0xf21): relocation truncated to fit: R_X86_64_32 against `.bss'
piodarray.F90:(.text+0xfd6): relocation truncated to fit: R_X86_64_PC32 against `.bss'
/home/gary/CESM/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/lib/libpio.a(piodarray.F90.o): In function `__piodarray_MOD_write_darray_nf_double':
piodarray.F90:(.text+0x2503): relocation truncated to fit: R_X86_64_PC32 against `.bss'
piodarray.F90:(.text+0x252e): relocation truncated to fit: R_X86_64_32 against `.bss'
/home/gary/CESM/cesm1_2_2/build/gnu/mpich/nodebug/nothreads/lib/libpio.a(piodarray.F90.o): In function `__piodarray_MOD_write_darray_nf_int':
piodarray.F90:(.text+0x3a60): relocation truncated to fit: R_X86_64_PC32 against `.bss'
piodarray.F90:(.text+0x3a8b): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
gmake: *** [/home/gary/CESM/cesm1_2_2/build/cesm.exe] Error 1
~
It may be caused by the large array as I learned after googling. One solution is to add a compile flag "- -mcmodel=medium", however, I couldn't find where to add this flag. I tried to use <ADD_FFLAGS> and <ADD_CFLAGS> in the "config_compilers.xml", but it didn't work. I think that may because the command is mpif90 and I don't know how to set a flag on it.
Or, it may be caused by other reasons.
Any help will be appreciated.
(attachments contain 4 configure files that I edited in the "Machine" directory and 1 error log showing above)
 

Attachments

  • attachments.zip
    14.1 KB · Views: 2

Gary

Gary Cui
New Member
Thanks for the reply. I've downloaded the newest version of PIO (2.5.1) and installed it. However, I still don't know how to link the CESM and PIO I've installed. Could you please tell me where can I replace the PIO path used by CESM?
I just replaced all the files in original pio directory by those of 1.8.12 version. I didn't "link the CESM and PIO" and it works fine so far.
 

Jing

Jing
New Member
I just replaced all the files in original pio directory by those of 1.8.12 version. I didn't "link the CESM and PIO" and it works fine so far.
Thanks for the reply, 1.8.12 didn't work for my case, but 1.8.14 did. It may caused by the version of netcdf.
 
Top