[MITgcm-support] problem of 'relocation truncated to fit'

ouc.edu.cn ouc.edu.cn at 163.com
Wed Apr 7 06:14:49 EDT 2010


Hi,
  (1)According to Dr. Constantinos Evangelinos's first suggestion, I have added a -fPIC to all my compiler flag settings (I didn't use NetCDF library). The problem was kind of solved since 'mitgcmuv' was generated. However, the running process always stops during the initialization process, i.e. ,in 
(PID.TID 0000.0001)                 7.595903585213828E+11,      /* J =  6 */
(PID.TID 0000.0001)                 1.256988025866159E+11,      /* J =  7 */
(PID.TID 0000.0001)                 3.114701712383415E+10,      /* J =  8 */
(PID.TID 0000.0001)                 1.906894582127841E+10,      /* J =  9 */
(PID.TID 0000.0001)                 1.778312281291121E+10,      /* J = 10 */
(PID.TID 0000.0001)                 1.767296294082175E+10,      /* J = 11 */
(PID.TID 0000.0001)                 1.766570972269858E+10,      /* J = 12 */
(PID.TID 0000.0001)                 1.766536484320423E+10,      /* J = 13 */
(PID.TID 0000.0001)                 1.766535398855257E+10,      /* J = 14 */
(PID.TID 0000.0001)                 1.766535378941503E+10,      /* J = 15 */
(PID.TID 0000.0001)                 1.766535378766544E+10,      /* J = 16 */
(PID.TID 0000.0001)    63 @  1.766535378766014E+10              /* J = 17: 79 */
(PID.TID 0000.0001)     ;
(PID.TID 0000.0001) rAs =  /* rAs(:,1,:,1) ( m - cartesian, degrees - spherical ) */
(PID.TID 0000.0001)                 2.082708017842099E+15,      /* I =  1 */
(PID.TID 0000.0001)                 5.106592900318132E+14,      /* I =  2 */
(PID.TID 0000.0001)                 1.155498634784791E+14,      /* I =  3 */
(PID.TID 0000.0001)                 2.390406144143715E+13,      /* I =  4 */
(PID.TID 0000.0001)                 4.478373568447705E+12,      /* I =  5 */
(PID.TID 0000.0001)                 7.595903585213828E+11,      /* I =  6 */
(PID.TID 0000.0001)                 1.256988025866159E+11,      /* I =  7 */
(PID.TID 0000.0001)                 3.114701712383415E+10,      /* I =  8 */
(PID.TID 0000.0001)                 1.906894582127841E+10,      /* I =  9 */
(PID.TID 0000.0001)                 1.778312281291121E+10,      /* I = 10 */
(PID.TID 0000.0001)                 1.767296294082175E+10,      /* I = 11 */
(PID.TID 0000.0001)                 1.766570972269858E+10,      /* I = 12 */
(PID.TID 0000.0001)         
 
    
Here is the compiler 'Linux_amd64_pgf77' I use after adding  -fPIC to all my compiler flag settings:
#!/bin/bash
#
#  $Header: /u/gcmpack/MITgcm/tools/build_options/linux_amd64_pgf77,v 1.1 2005/01/12 22:04:59 ce107 Exp $
#  $Name: checkpoint61z $
#
# Build options for Suse SLES-8.1 Opteron
# tested on (Linux ln0127en 2.4.21-143-numa #1 SMP Fri Oct 31 00:17:52 UTC 2003 x86_64 unknown) system 20041512
#
INCLUDES="-I/public/soft/ompi133-pgi702/include"
LIBS="-L/public/soft/ompi133-pgi702/lib -lmpi -lmpi_f77"
INCLUDEDIRS="../../../../../../../public/soft/ompi133-pgi702/include"
FC=pgf77
DEFINES='-DWORDLENGTH=4'
CPP='cpp  -traditional -P'
NOOPTFLAGS='-O0 -fPIC'
MAKEDEPEND=/public/home/hycom/Mitgcm/MITgcm_c61z/tools/cyrus-imapd-makedepend/makedepend
if test "x$IEEE" = x ; then
    #  No need for IEEE-754
    FFLAGS='-byteswapio -r8 -Mnodclchk -Mextend -Ktrap=fp -fPIC'
    FOPTIM='-tp k8-64 -pc=64 -O2 -Mvect=sse' #-fastsse -O3 -Msmart -Mvect=cachesize:1048576,transform'
else
    #  Try to follow IEEE-754
    FFLAGS='-byteswapio -r8 -Mnodclchk -Mextend -Ktrap=fp -fPIC'
    FOPTIM='-tp k8-64 -pc=64 -O2 -Mvect=sse -Kieee' #-fastsse -O3 -Msmart -Kieee -Mvect=cachesize:1048576,transform'
fi
CFLAGS='-O2 -fPIC'
 
(2) After that, I tried another way as suggested by Dr. Constantinos Evangelinos. i.e.add a -mcmodel=medium to all my compiler flag settings. and Linux_amd64_pgf77 now reads:
#!/bin/bash
#
#  $Header: /u/gcmpack/MITgcm/tools/build_options/linux_amd64_pgf77,v 1.1 2005/01/12 22:04:59 ce107 Exp $
#  $Name: checkpoint61z $
#
# Build options for Suse SLES-8.1 Opteron
# tested on (Linux ln0127en 2.4.21-143-numa #1 SMP Fri Oct 31 00:17:52 UTC 2003 x86_64 unknown) system 20041512
#
INCLUDES="-I/public/soft/ompi133-pgi702/include"
LIBS="-L/public/soft/ompi133-pgi702/lib -lmpi -lmpi_f77"
INCLUDEDIRS="../../../../../../../public/soft/ompi133-pgi702/include"
FC=pgf77
DEFINES='-DWORDLENGTH=4'
CPP='cpp  -traditional -P'
NOOPTFLAGS='-O0 -mcmodel=medium'
MAKEDEPEND=/public/home/hycom/Mitgcm/MITgcm_c61z/tools/cyrus-imapd-makedepend/makedepend
if test "x$IEEE" = x ; then
    #  No need for IEEE-754
    FFLAGS='-byteswapio -r8 -Mnodclchk -Mextend -Ktrap=fp -mcmodel=medium'
    FOPTIM='-tp k8-64 -pc=64 -O2 -Mvect=sse' #-fastsse -O3 -Msmart -Mvect=cachesize:1048576,transform'
else
    #  Try to follow IEEE-754
    FFLAGS='-byteswapio -r8 -Mnodclchk -Mextend -Ktrap=fp -mcmodel=medium'
    FOPTIM='-tp k8-64 -pc=64 -O2 -Mvect=sse -Kieee' #-fastsse -O3 -Msmart -Kieee -Mvect=cachesize:1048576,transform'
fi
CFLAGS='-O2  -mcmodel=medium'
 
However, an error appeared during the 'make' process.i.e.
sigreg.o: In function `killhandler':
sigreg.c:(.text+0x3): relocation truncated to fit: R_X86_64_PC32 against symbol `ip' defined in COMMON section in sigreg.o
sigreg.o: In function `sigreg_':
sigreg.c:(.text+0x1c): relocation truncated to fit: R_X86_64_PC32 against symbol `ip' defined in COMMON section in sigreg.o
make: *** [mitgcmuv] Error 2

So what is the problem with this ? Is it because there is something wrong with this compiler file ? I'd appreciate it if you can give some advice to me.
Cheers,
Dwight
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20100407/365ded91/attachment.htm>


More information about the MITgcm-support mailing list