PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

MPICH linking failing
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
mkcolg



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

PostPosted: Tue Oct 15, 2013 5:41 am    Post subject: Reply with quote

Hi rvasquez,

Can you try adding the "-Mcudax86" flag to your link? Without it, the compiler doesn't know it needs to add the CUDA x86 libraries to the link.

Also, you probably should remove the "-L/opt/pgi/linux86-64/13.8/lib" options. Since you're using 13.9 now, this may cause you to pick-up the wrong libs.

- Mat
Back to top
View user's profile
rvasquez



Joined: 24 Sep 2013
Posts: 7

PostPosted: Wed Oct 16, 2013 2:29 am    Post subject: Reply with quote

Hello,
Thanks a lot for your answer, unfortunately I still see some errors in the standard cuda calls
Code:

/usr/local/bin/mpic++  -Mcudax86 -O3   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_BSD_SOURCE   -I/usr/local/include  -I/opt/pgi/linux86-64/2013/cuda/5.0/include -I/usr/local/include -I/usr/include/    DecompUtils.o PrintLog.o bitoperations.o  tools.o ArrayHandling.o  region_distance.o cpml_help.o CudaMasterFile.o   grid.o lorentz_help.o populate.o    outs.o  rotate_help.o  fdtd.o  -o ../obj/fdtd -L/usr/local/lib -L/opt/pgi/linux86-64/2013/cuda/5.0/lib64 -L/usr/local/lib /usr/local/lib/libhdf5_hl.a /usr/local/lib/libhdf5.a -lz -lm -Wl,-rpath -Wl,/usr/local/lib -L/usr/lib/ -lfftw3 -lz -lm

Output:
Code:

DecompUtils.o: In function `initCUDA_MPI(int, char **, int *, my_grid *)':
/home/cuda/Code/bcalmrepo/CUDA_code/./DecompUtils.c:38: undefined reference to `cuInit'
/home/cuda/Code/bcalmrepo/CUDA_code/./DecompUtils.c:79: undefined reference to `cuDeviceGet'
/home/cuda/Code/bcalmrepo/CUDA_code/./DecompUtils.c:79: undefined reference to `cuCtxCreate_v2'
CudaMasterFile.o: In function `EnableP2P':
/home/cuda/Code/bcalmrepo/CUDA_code/./MultipleDeviceHandling.cu:158: undefined reference to `cudaDeviceEnablePeerAccess'
/home/cuda/Code/bcalmrepo/CUDA_code/./MultipleDeviceHandling.cu:172: undefined reference to `cudaDeviceEnablePeerAccess'
outs.o: In function `intialize_outzones(char *, my_grid *, out_zone *)':
/home/cuda/Code/bcalmrepo/CUDA_code/./outs.c:770: undefined reference to `cudaStreamCreateWithFlags'
fdtd.o: In function `main':
/home/cuda/Code/bcalmrepo/CUDA_code/./fdtd.c:322: undefined reference to `cudaDeviceSynchronize'
/home/cuda/Code/bcalmrepo/CUDA_code/./fdtd.c:360: undefined reference to `cudaDeviceSynchronize'
/home/cuda/Code/bcalmrepo/CUDA_code/./fdtd.c:360: undefined reference to `cudaDeviceReset'
/usr/local/lib/libhdf5.a(H5PL.o): In function `H5PL__open':
/home/cuda/Downloads/hdf5-1.8.11/src/./H5PL.c:523: undefined reference to `dlopen'
/home/cuda/Downloads/hdf5-1.8.11/src/./H5PL.c:535: undefined reference to `dlsym'
/home/cuda/Downloads/hdf5-1.8.11/src/./H5PL.c:552: undefined reference to `dlerror'
/usr/local/lib/libhdf5.a(H5PL.o): In function `H5PL__search_table':
/home/cuda/Downloads/hdf5-1.8.11/src/./H5PL.c:636: undefined reference to `dlsym'
/usr/local/lib/libhdf5.a(H5PL.o): In function `H5PL__close':
/home/cuda/Downloads/hdf5-1.8.11/src/./H5PL.c:657: undefined reference to `dlclose'
make: *** [../obj/fdtd] Error 2

Back to top
View user's profile
mkcolg



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

PostPosted: Wed Oct 16, 2013 6:03 am    Post subject: Reply with quote

Hmm. Did your part of your code get compiled with CUDA C instead of CUDA X86?

- Mat
Back to top
View user's profile
rvasquez



Joined: 24 Sep 2013
Posts: 7

PostPosted: Thu Oct 17, 2013 2:35 am    Post subject: Reply with quote

I don't think so. We don't even have nvcc installed on the machine. This one has been specifically using only pgcc or pgcpp.
Back to top
View user's profile
rvasquez



Joined: 24 Sep 2013
Posts: 7

PostPosted: Mon Oct 21, 2013 12:30 am    Post subject: Reply with quote

It seems like those functions are not implemented for C++ although they appear in the Fortran API (http://www.pgroup.com/doc/pgicudaforug.pdf)
Or is there something else?
--R
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 Previous  1, 2, 3  Next
Page 2 of 3

 
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