PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

PGI accelerator model with OpenMP/MPI
Goto page Previous  1, 2
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
tannguyen



Joined: 26 Jul 2010
Posts: 11

PostPosted: Wed Sep 08, 2010 4:38 pm    Post subject: Reply with quote

Awesome, the pgcc compiler is working fine now. However, I got another problem when liking objects compiled by pgcc using MPI compiler. Could you help me figure it out? Thanks.

mpic++ -O3 -o VectorProduct VectorProduct.o Timer.o

VectorProduct.o(.text+0x18e): In function `main':
./VectorProduct.c:55: undefined reference to `_mp_malloc'
VectorProduct.o(.text+0x1a0):./VectorProduct.c:55: undefined reference to `_mp_malloc'
VectorProduct.o(.text+0x3ab):./VectorProduct.c:90: undefined reference to `acc_set_device_num'
VectorProduct.o(.text+0x3ca):./VectorProduct.c:90: undefined reference to `__pgi_cu_init'
VectorProduct.o(.text+0x3de):./VectorProduct.c:90: undefined reference to `__pgi_cu_module'
VectorProduct.o(.text+0x3f7):./VectorProduct.c:90: undefined reference to `__pgi_cu_module_function'
VectorProduct.o(.text+0x41e):./VectorProduct.c:90: undefined reference to `__pgi_cu_alloc'
VectorProduct.o(.text+0x442):./VectorProduct.c:90: undefined reference to `__pgi_cu_alloc'
VectorProduct.o(.text+0x466):./VectorProduct.c:90: undefined reference to `__pgi_cu_alloc'
VectorProduct.o(.text+0x4dc):./VectorProduct.c:90: undefined reference to `__pgi_cu_uploadp'
VectorProduct.o(.text+0x552):./VectorProduct.c:90: undefined reference to `__pgi_cu_uploadp'
VectorProduct.o(.text+0x59a):./VectorProduct.c:90: undefined reference to `__pgi_cu_uploadc'
VectorProduct.o(.text+0x5cb):./VectorProduct.c:97: undefined reference to `__pgi_cu_paramset'
VectorProduct.o(.text+0x615):./VectorProduct.c:97: undefined reference to `__pgi_cu_launch'
VectorProduct.o(.text+0x6a3):./VectorProduct.c:98: undefined reference to `__pgi_cu_downloadp'
VectorProduct.o(.text+0x6ba):./VectorProduct.c:98: undefined reference to `__pgi_cu_free'
VectorProduct.o(.text+0x6cd):./VectorProduct.c:98: undefined reference to `__pgi_cu_free'
VectorProduct.o(.text+0x6e0):./VectorProduct.c:98: undefined reference to `__pgi_cu_free'
VectorProduct.o(.text+0x6e5):./VectorProduct.c:98: undefined reference to `__pgi_cu_close'
VectorProduct.o(.text+0x74d):./VectorProduct.c:107: undefined reference to `_mp_free'
VectorProduct.o(.text+0x755):./VectorProduct.c:107: undefined reference to `_mp_free'
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Sep 08, 2010 5:16 pm    Post subject: Reply with quote

You're missing the PGI runtime libraries on your link. I'm assuming mpic++ is using g++:

Code:
mpic++ -O3 -o VectorProduct VectorProduct.o Timer.o  -L/usr/pgi/linux86-64/10.8/bin  -rpath /usr/pgi/linux86-64/2010/cuda/2.3/lib -lacc1 -ldl -lnspgc -lpgc
Note: change the paths to the PGI libraries to match what's on your system.

Alternatively, if you're MPI installation is configured to use the PGI drives, you could use 'mpicc' and add the "-ta=nvidia" flag to your link line. pgcc will add the correct libraries when the -ta flag is used.

Hope this helps,
Mat
Back to top
View user's profile
tannguyen



Joined: 26 Jul 2010
Posts: 11

PostPosted: Wed Sep 08, 2010 10:40 pm    Post subject: Reply with quote

I added the path to the PGI libraries and the linker are working well.
-L/usr/local/pgi/linux86-64/10.0/lib -lacc1 -ldl -lnspgc -lpgc

Thank you for your help.

Tan.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Goto page Previous  1, 2
Page 2 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