| View previous topic :: View next topic |
| Author |
Message |
jurij
Joined: 03 Aug 2004 Posts: 1
|
Posted: Thu Sep 16, 2004 5:56 am Post subject: linker warnings after using k8-64 flag |
|
|
Hi!
I am trying to compile one program package on the Opteron using pgf90 compiler. If the tp=k8-32 flag is used, everything is OK. But when the tp=k8-64 flag is used, two different linker warnings are displayed:
1.
usr/bin/ld: Warning: alignment 16 of symbol `pghpf_type_' in /usr/pgi/linux86/5.2/lib/libpgf902.a(const.o) is smaller than 32 in mc.o
2.
/usr/bin/ld: warning: i386:x86-64 architecture of input file `mc.o' is incompatible with i386 output
(and more similar messages as the second one for each f90 file)
There is one message of type 1 and several of type 2 (for each f90 file compiled).
The makefile used is given below:
-------------------------------------------
ARCH = LINUX
SER_DEFINES = -D$(ARCH)
CSER_DEFINES = -D$(ARCH)
PAR_DEFINES = -D$(ARCH) -D_PAR_
PAR2_DEFINES = -D$(ARCH) -D_PAR2_
SER_XLF = pgf90
SER_XLFLINK = $(SER_XLF) -Wl,-Bstatic
PAR_XLF = $(SER_XLF)
PAR_XLFLINK = mpif90 -Wl,-Bstatic
FOPT = -O3 -Mfree -tp=k8-64
FSERFLAG = $(SER_DEFINES) $(FOPT)
FPARFLAG = $(PAR_DEFINES) $(FOPT)
FPAR2FLAG = $(PAR2_DEFINES) $(FOPT)
XLC = cc
COPT = -O
CFLAG = $(CSER_DEFINES) $(COPT)
-------------------------------------------------
The fortran 90 code includes also some c statements for parallel executable generation:
#if defined (_PAR_)
f90 code
#else
f90 code
#endif
Using -m64 flag does not help.
Pure f90 programs compile smoothly using k8-64 flag and run considerably faster than their k8-32 generated counterparts.
The OS is Fedora Core 2 x86-64.
What flags should be used ?
Jurij |
|
| Back to top |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Thu Sep 16, 2004 8:29 am Post subject: Re: linker warnings after using k8-64 flag |
|
|
| jurij wrote: |
1.
usr/bin/ld: Warning: alignment 16 of symbol `pghpf_type_' in /usr/pgi/linux86/5.2/lib/libpgf902.a(const.o) is smaller than 32 in mc.o
2.
/usr/bin/ld: warning: i386:x86-64 architecture of input file `mc.o' is incompatible with i386 output
(and more similar messages as the second one for each f90 file)
|
For 1, this is the wrong library for 64-bit. You should be using the "linux86-64/5.2/lib/libpgf902.a" library. For 2, you most likely compiled this as a 32-bit object but are linking with "-tp k8-64".
Try cleaning all the objects and executable(s) and re-build everything with "-tp k8-64". I suspect you build everything with k8-32 but didn't clean before trying to relink with k8-64.
| Quote: |
Using -m64 flag does not help.
|
"-m64" is a gcc flag.
| Quote: |
What flags should be used ?
|
We typically recommend using "-fastsse -Mipa=fast,inline". For most programs this flag set gives the best performance. You can also try "-fast", "-fastsse", "-fast -Mipa=fast", "-fastsse -O3 -Mipa=fast", etc.
- Mat |
|
| Back to top |
|
 |
bob101
Joined: 20 Jan 2005 Posts: 1
|
Posted: Wed Feb 02, 2005 12:08 pm Post subject: link issues (newbie) |
|
|
I'm having a similar problem...
/usr/bin/ld: warning: i386:x86-64 architecture of input file `/opt/mpich/lib/libmpich.a(dmpipk.o)' is incompatible with i386 output
file dmpipk.o (from MPICH-GM package)
dmpipk.o: ELF 64-bit LSB relocatable, AMD x86-64, version 1 (SYSV), not stripped
file dynm.o (from 3rd party)
dynm.o: ELF 64-bit LSB relocatable, AMD x86-64, version 1 (SYSV), not stripped
Any ideas? |
|
| Back to top |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Wed Feb 02, 2005 2:12 pm Post subject: |
|
|
Hi Bob,
While you can create 32-bit executables on a AMD x86-64 using the "-tp k8-32" flag, you can not mix 32 and 64-bit objects. The objects in the libraries your using were compiled as 64-bit objects, so you may not use them to link with your 32-bit application. You must either re-compile your program as a 64-bit object (ie "-tp k8-64") or obtain 32-bit versions of these libraries.
Hope this helps,
Mat |
|
| Back to top |
|
 |
|