PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

multiple definitions in -lpghpf and -lpgf90
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
bill h



Joined: 02 Sep 2005
Posts: 4

PostPosted: Fri Sep 02, 2005 11:32 am    Post subject: multiple definitions in -lpghpf and -lpgf90 Reply with quote

Hello,
I'm getting multiple definition errors, with different sizes for symbols, in many functions in the pghpf and pgf90 libraries when trying to compile and link F90 and HPF code. This happens both when using version 5.1 on an opteron system, and also when using an old version 3.1 on a p4 system. Do you have any suggestions?
Thanks.
The error messages are a follows:

make -f Makefile.multivariate.hpf
pghpf -O -g -Minform=warn -Minfo=all -Mextend -Mr8 -o HMAX.multivariate lkh_multivariate.o read_multivariate.o legaus.o gammln.o ddaskr.o daux.o dlinpk.o dbanpre.o num_call.o -L/home/hazelton/Bhat_panther -lBhat_hpf -lpghpf -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl
Timing stats:
Total time 0 millisecs
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(error.o)(.text+0x0): In function `__hpfio_errinit':
error.c: multiple definition of `__hpfio_errinit'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(error.o)(.text+0x0):error.c: first defined here
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(error.o)(.text+0xa0): In function `__hpfio_error':
error.c: multiple definition of `__hpfio_error'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(error.o)(.text+0xa0):error.c: first defined here
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(error.o)(.text+0x2bf): In function `__hpfio_eoferr':
error.c: multiple definition of `__hpfio_eoferr'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(error.o)(.text+0x2bf):error.c: first defined here
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(error.o)(.text+0x3e6): In function `__hpfio_eorerr':
error.c: multiple definition of `__hpfio_eorerr'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(error.o)(.text+0x3e6):error.c: first defined here
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(fmtwrite.o)(.text+0x6f2): In function `__f90io_fmt_write':
fmtwrite.c: multiple definition of `__f90io_fmt_write'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(fmtwrite.o)(.text+0x7f8):fmtwrite.c: first defined here
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)(.text+0x0): In function `__hpf_ptr_aligned':
allo.c: multiple definition of `__hpf_ptr_aligned'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o)(.text+0x0):allo.c: first defined here
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)(.text+0x4a): In function `__hpf_ptr_offset':
allo.c: multiple definition of `__hpf_ptr_offset'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o)(.text+0x4a):allo.c: first defined here
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)(.text+0x13a): In function `__hpf_alloc':
allo.c: multiple definition of `__hpf_alloc'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o)(.text+0x13a):allo.c: first defined here
/usr/bin/ld: Warning: size of symbol `__hpf_alloc' changed from 438 in /usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o) to 534 in /usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)(.text+0x350): In function `__hpf_allocated':
allo.c: multiple definition of `__hpf_allocated'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o)(.text+0x2f0):allo.c: first defined here
/usr/bin/ld: Warning: size of symbol `__hpf_allocated' changed from 55 in /usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o) to 106 in /usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)(.text+0x3ba): In function `ftn_allocated':
allo.c: multiple definition of `ftn_allocated'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o)(.text+0x327):allo.c: first defined here
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)(.text+0x419): In function `ftn_allocate':
allo.c: multiple definition of `ftn_allocate'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o)(.text+0x386):allo.c: first defined here
/usr/bin/ld: Warning: size of symbol `ftn_allocate' changed from 81 in /usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o) to 64 in /usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)(.text+0x459): In function `ftn_alloc':
allo.c: multiple definition of `ftn_alloc'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o)(.text+0x3d7):allo.c: first defined here
/usr/bin/ld: Warning: size of symbol `ftn_alloc' changed from 77 in /usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o) to 60 in /usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)(.text+0x4f1): In function `__hpf_allocate':
allo.c: multiple definition of `__hpf_allocate'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o)(.text+0x4a2):allo.c: first defined here
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)(.text+0x519): In function `__hpf_local_allocate':
allo.c: multiple definition of `__hpf_local_allocate'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o)(.text+0x4ca):allo.c: first defined here
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)(.text+0x541): In function `__hpf_dealloc':
allo.c: multiple definition of `__hpf_dealloc'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o)(.text+0x4f2):allo.c: first defined here
/usr/bin/ld: Warning: size of symbol `__hpf_dealloc' changed from 193 in /usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o) to 266 in /usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)(.text+0x64b): In function `ftn_deallocate':
allo.c: multiple definition of `ftn_deallocate'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o)(.text+0x5b3):allo.c: first defined here
/usr/bin/ld: Warning: size of symbol `ftn_deallocate' changed from 35 in /usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o) to 19 in /usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)(.text+0x65e): In function `ftn_dealloc':
allo.c: multiple definition of `ftn_dealloc'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o)(.text+0x5d6):allo.c: first defined here
/usr/bin/ld: Warning: size of symbol `ftn_dealloc' changed from 35 in /usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o) to 19 in /usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)(.text+0x6a9): In function `__hpf_deallocate':
allo.c: multiple definition of `__hpf_deallocate'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o)(.text+0x651):allo.c: first defined here
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)(.text+0x6c1): In function `__hpf_local_deallocate':
allo.c: multiple definition of `__hpf_local_deallocate'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o)(.text+0x669):allo.c: first defined here
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(entry.o)(.text+0x0): In function `__hpf_entry_init':
entry.c: multiple definition of `__hpf_entry_init'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(entry.o)(.text+0x0):entry.c: first defined here
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(entry.o)(.text+0x282): In function `__hpf_traceback':
entry.c: multiple definition of `__hpf_traceback'
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(entry.o)(.text+0x282):entry.c: first defined here
/usr/bin/ld: Warning: size of symbol `__hpf_traceback' changed from 368 in /usr/pgi/linux86-64/5.1/lib/libpghpf.a(entry.o) to 369 in /usr/pgi/linux86-64/5.1/lib/libpgf90.a(entry.o)
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(entry.o)(.text+0x406): In function `__hpf_tracecall':
entry.c: multiple definition of `__hpf_tracecall'

...

/usr/pgi/linux86-64/5.1/lib/libpghpf.a(rdst.o)(.text+0x2dc8):rdst.c: first defined here
/usr/bin/ld: Warning: size of symbol `__hpf_copy_out' changed from 888 in /usr/pgi/linux86-64/5.1/lib/libpghpf.a(rdst.o) to 445 in /usr/pgi/linux86-64/5.1/lib/libpgf90.a(rdst.o)
make: *** [HMAX.multivariate] Error 2
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6139
Location: The Portland Group Inc.

PostPosted: Fri Sep 02, 2005 4:07 pm    Post subject: Reply with quote

Hi Bill h,

The pgf90 and pghpf runtime libraries have some of the same object names and are typically not used together. To fix, remove all the PGI libraries from your link line since pghpf will add the appropriate libraries. The exception to this would be if your compiling with pgf90 but linking with pghpf. In this case, remove "-lpghpf" from the link line or insert it after "-lpgf90".

- Mat
Back to top
View user's profile
bill h



Joined: 02 Sep 2005
Posts: 4

PostPosted: Fri Sep 02, 2005 4:31 pm    Post subject: Reply with quote

Hi Mat,
I'm trying to compile part with pghpf and part with pgf90, then link with pghpf. I tried to do what you suggested, using a Makefile as follows:

COMP=pghpf
COMP90=pgf90
FFLAGS= -O -g -Minform=warn -Minfo=all -Mextend -Mr8
FOPTIONS=-L/home/hazelton/Bhat_panther -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -lBhat_hpf -lpghpf

all: HMAX.multivariate

HMAX.multivariate: lkh_multivariate.o read_multivariate.o legaus.o gammln.o ddaskr.o daux.o dlinpk.o dbanpre.o num_call.o
$(COMP) $(FFLAGS) -o HMAX.multivariate lkh_multivariate.o read_multivariate.o legaus.o gammln.o ddaskr.o daux.o dlinpk.o dbanpre.o num_call.o $(FOPTIONS)

lkh_multivariate.o: lkh_multivariate.hpf model.multivariate
$(COMP) $(FFLAGS) -c lkh_multivariate.hpf

read_multivariate.o: read_multivariate.hpf
$(COMP) $(FOPTIONS) $(FFLAGS) -c read_multivariate.hpf

num_call.o: num_call.f90
$(COMP90) $(FFLAGS) -c num_call.f90

ddaskr.o: ddaskr.f90
$(COMP90) $(FFLAGS) -c ddaskr.f90

daux.o: daux.f90
$(COMP90) $(FFLAGS) -c daux.f90

dlinpk.o: dlinpk.f90
$(COMP90) $(FFLAGS) -c dlinpk.f90

dbanpre.o: dbanpre.f90
$(COMP90) $(FFLAGS) -c dbanpre.f90


legaus.o: legaus.hpf
$(COMP) $(FFLAGS) -Mextend -c legaus.hpf

gammln.o: gammln.hpf
$(COMP) $(FFLAGS) -Mextend -c gammln.hpf


The hpf compilation goes ok, but the f90 part doesn't compile.
See below:

hazelton@panther:~/Data/Prostate/HPF> make -f Makefile.multivariateHP.hpf
pghpf -O -g -Minform=warn -Minfo=all -Mextend -Mr8 -c lkh_multivariate.hpf
158, Independent loop parallelized
Invariant assignments hoisted out of loop
175, Invariant assignments hoisted out of loop
191, Invariant assignments hoisted out of loop
201, Invariant assignments hoisted out of loop
212, sum reduction inlined
220, Independent loop parallelized
244, Invariant assignments hoisted out of loop
246, Invariant assignments hoisted out of loop
272, Invariant assignments hoisted out of loop
284, sum reduction inlined
287, sum reduction inlined
313, Invariant assignments hoisted out of loop
327, sum reduction inlined
0 inform, 5 warnings, 0 severes, 0 fatal for func
Timing stats:
init 50 millisecs 75%
parser 16 millisecs 24%
Total time 66 millisecs
Timing stats:
expand 16 millisecs 6%
optimize 51 millisecs 20%
schedule 183 millisecs 73%
Total time 250 millisecs
pghpf -L/home/hazelton/Bhat_panther -lBhat_hpf -lpghpf -O -g -Minform=warn -Minfo=all -Mextend -Mr8 -c read_multivariate.hpf
Timing stats:
Total time 0 millisecs
Timing stats:
schedule 33 millisecs 100%
Total time 33 millisecs
pghpf -O -g -Minform=warn -Minfo=all -Mextend -Mr8 -Mextend -c legaus.hpf
Timing stats:
Total time 0 millisecs
Timing stats:
schedule 16 millisecs 100%
Total time 16 millisecs
pghpf -O -g -Minform=warn -Minfo=all -Mextend -Mr8 -Mextend -c gammln.hpf
Timing stats:
Total time 0 millisecs
Timing stats:
Total time 0 millisecs
make: *** No rule to make target `num_call.o', needed by `HMAX.multivariate'. Stop.
hazelton@panther:~/Data/Prostate/HPF>
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6139
Location: The Portland Group Inc.

PostPosted: Fri Sep 02, 2005 4:47 pm    Post subject: Reply with quote

Looks like a problem with make not finding a rule for target 'num_call.o'. Is this rule defined in your makefile?

- Mat
Back to top
View user's profile
bill h



Joined: 02 Sep 2005
Posts: 4

PostPosted: Fri Sep 02, 2005 5:35 pm    Post subject: Reply with quote

Hi Mat,
Sorry to keep bothering you. I fixed the problem with not finding a rule for target 'num_call.o', but am back to the origonal problem. I put -lpgf90 and associated libraries first, and eliminated the reference to -lpghpf in the Makefile.

hazelton@panther:~/Data/Prostate/HPF> make -f Makefile.multivariate.hpf
pghpf -O -g -Minform=warn -Minfo=all -Mextend -Mr8 -o HMAX.multivariate lkh_multivariate.o read_multivariate.o legaus.o gammln.o ddaskr.o daux.o dlinpk.o numcall.o dbanpre.o -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -L/home/hazelton/Bhat_panther -lBhat_hpf
Timing stats:
Total time 0 millisecs
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o)(.text+0x0): In function `__hpf_ptr_aligned':
allo.c: multiple definition of `__hpf_ptr_aligned'
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)(.text+0x0):allo.c: first defined here
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o)(.text+0x4a): In function `__hpf_ptr_offset':
allo.c: multiple definition of `__hpf_ptr_offset'
/usr/pgi/linux86-64/5.1/lib/libpgf90.a(allo.o)(.text+0x4a):allo.c: first defined here
/usr/pgi/linux86-64/5.1/lib/libpghpf.a(allo.o)(.text+0x13a): In function `__hpf_alloc':
allo.c: multiple definition of `__hpf_alloc'
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group