[MITgcm-support] adjoint compilation on 64bit system

Martin Losch mlosch at awi-bremerhaven.de
Thu Feb 24 05:11:42 EST 2005


Hi,

I am trying to compile the adjoint MITgcm on an AMD 64bit opteron 
machine with the Portland Group fortran compiler. I have no problems 
with my build options file linux_amd64_pgf77_ocl (that I am responsible 
for anyway) as long as I don't ALLOW_ECCO_ADJOINT_RUN (in 
ECCO_CPPOPTIONS.h), but use ALLOW_ECCO_FORWARD_RUN. But as soon as 
there is the adjoint model involved (ad_taf_output.f) I get funny error 
messages at the link step:
> ad_taf_output.o: In function `adconvective_adjustment_':
> ad_taf_output.o(.text+0xf018): relocation truncated to fit: 
> R_X86_64_32S cadtheta_
> ad_taf_output.o(.text+0xf038): relocation truncated to fit: 
> R_X86_64_32S cadtheta_
> ad_taf_output.o(.text+0xf4e0): relocation truncated to fit: 
> R_X86_64_32S cadthetb_
> ad_taf_output.o(.text+0xf501): relocation truncated to fit: 
> R_X86_64_32S cadthetb_
(most of them concern common blocks defined in ad_taf_output.f for the 
tapes) but also:
> /var/tmp.shared/pgi/linux86-64/5.2/lib/libpgc.a(barrier.o): In 
> function `_mp_get_parpar':
> barrier.o(.text+0x69): relocation truncated to fit: R_X86_64_32S 
> _mp_parpar
> /var/tmp.shared/pgi/linux86-64/5.2/lib/libpgc.a(barrier.o): In 
> function `_mp_lcpu2':
> barrier.o(.text+0x34e): relocation truncated to fit: R_X86_64_32S 
> _mp_parpar
which doesn't have anything to do with ad_taf_output.f
These errors go away when I use an additional optiong: -fpic, which 
according to the man pages "(Linux only) Instructs the compiler to 
generate position-independent code with can be used to create shared 
object files ..."

I don't see why the TAMC/TAF generated code should need this option 
while the remaining part of the code doesn't need it. Any ideas?

Martin





More information about the MITgcm-support mailing list