PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

MPICH linking failing
Goto page 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
rvasquez



Joined: 24 Sep 2013
Posts: 7

PostPosted: Thu Oct 10, 2013 7:21 am    Post subject: MPICH linking failing Reply with quote

Hello,
I'm trying to build an application with PGI. It makes use of mvapich2 and hdf5. I've compiled as suggested here: http://www.pgroup.com/resources/hdf5/hdf5_2012.htm and http://www.pgroup.com/resources/mvapich/mvapich_2011.htm.
When I try to build I get this error:
Code:

pgcpp  -Mcudax86 -c  CudaMasterFile.cu
"MultipleDeviceHandling.cu", line 409: warning: variable "Errorout" was set
          but never used
     cudaError_t Errorout; // Errorstring
                 ^

NOTE: your trial license will expire in 13 days, 7.58 hours.
/usr/local/mpich2/bin/mpic++   -O3   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_BSD_SOURCE   -I/usr/local/mpich2/include  -I/opt/pgi/linux86-64/2013/cuda/5.0/include -I/usr/local/include -I/usr/include/   -c *.c           
ArrayHandling.c:
"/opt/pgi/linux86-64/2013/cuda/5.0/include/host_defines.h", line 128: catastrophic error:
          #error directive: --- !!! UNKNOWN COMPILER: please provide a CUDA
          compatible definition for '__align__' !!! ---
  #error --- !!! UNKNOWN COMPILER: please provide a CUDA compatible definition for '__align__' !!! ---
   ^

1 catastrophic error detected in the compilation of "ArrayHandling.c".
Compilation terminated.
DecompUtils.c:
"/opt/pgi/linux86-64/2013/cuda/5.0/include/host_defines.h", line 128: catastrophic error:
          #error directive: --- !!! UNKNOWN COMPILER: please provide a CUDA
          compatible definition for '__align__' !!! ---
  #error --- !!! UNKNOWN COMPILER: please provide a CUDA compatible definition for '__align__' !!! ---
   ^

1 catastrophic error detected in the compilation of "DecompUtils.c".
Compilation terminated.
PrintLog.c:
NOTE: your trial license will expire in 13 days, 7.58 hours.
bitoperations.c:
NOTE: your trial license will expire in 13 days, 7.58 hours.
cpml_help.c:
"/opt/pgi/linux86-64/2013/cuda/5.0/include/host_defines.h", line 128: catastrophic error:
          #error directive: --- !!! UNKNOWN COMPILER: please provide a CUDA
          compatible definition for '__align__' !!! ---
  #error --- !!! UNKNOWN COMPILER: please provide a CUDA compatible definition for '__align__' !!! ---
   ^

1 catastrophic error detected in the compilation of "cpml_help.c".
Compilation terminated.
fdtd.c:
"/opt/pgi/linux86-64/2013/cuda/5.0/include/host_defines.h", line 128: catastrophic error:
          #error directive: --- !!! UNKNOWN COMPILER: please provide a CUDA
          compatible definition for '__align__' !!! ---
  #error --- !!! UNKNOWN COMPILER: please provide a CUDA compatible definition for '__align__' !!! ---
   ^

1 catastrophic error detected in the compilation of "fdtd.c".
Compilation terminated.
grid.c:
"/opt/pgi/linux86-64/2013/cuda/5.0/include/host_defines.h", line 128: catastrophic error:
          #error directive: --- !!! UNKNOWN COMPILER: please provide a CUDA
          compatible definition for '__align__' !!! ---
  #error --- !!! UNKNOWN COMPILER: please provide a CUDA compatible definition for '__align__' !!! ---
   ^

1 catastrophic error detected in the compilation of "grid.c".
Compilation terminated.
lorentz_help.c:
"/opt/pgi/linux86-64/2013/cuda/5.0/include/host_defines.h", line 128: catastrophic error:
          #error directive: --- !!! UNKNOWN COMPILER: please provide a CUDA
          compatible definition for '__align__' !!! ---
  #error --- !!! UNKNOWN COMPILER: please provide a CUDA compatible definition for '__align__' !!! ---
   ^

1 catastrophic error detected in the compilation of "lorentz_help.c".
Compilation terminated.
outs.c:
"/opt/pgi/linux86-64/2013/cuda/5.0/include/host_defines.h", line 128: catastrophic error:
          #error directive: --- !!! UNKNOWN COMPILER: please provide a CUDA
          compatible definition for '__align__' !!! ---
  #error --- !!! UNKNOWN COMPILER: please provide a CUDA compatible definition for '__align__' !!! ---
   ^

1 catastrophic error detected in the compilation of "outs.c".
Compilation terminated.
populate.c:
"/opt/pgi/linux86-64/2013/cuda/5.0/include/host_defines.h", line 128: catastrophic error:
          #error directive: --- !!! UNKNOWN COMPILER: please provide a CUDA
          compatible definition for '__align__' !!! ---
  #error --- !!! UNKNOWN COMPILER: please provide a CUDA compatible definition for '__align__' !!! ---
   ^

1 catastrophic error detected in the compilation of "populate.c".
Compilation terminated.
region_distance.c:
"/opt/pgi/linux86-64/2013/cuda/5.0/include/host_defines.h", line 128: catastrophic error:
          #error directive: --- !!! UNKNOWN COMPILER: please provide a CUDA
          compatible definition for '__align__' !!! ---
  #error --- !!! UNKNOWN COMPILER: please provide a CUDA compatible definition for '__align__' !!! ---
   ^

1 catastrophic error detected in the compilation of "region_distance.c".
Compilation terminated.
rotate_help.c:
"/opt/pgi/linux86-64/2013/cuda/5.0/include/host_defines.h", line 128: catastrophic error:
          #error directive: --- !!! UNKNOWN COMPILER: please provide a CUDA
          compatible definition for '__align__' !!! ---
  #error --- !!! UNKNOWN COMPILER: please provide a CUDA compatible definition for '__align__' !!! ---
   ^

1 catastrophic error detected in the compilation of "rotate_help.c".
Compilation terminated.
tools.c:
NOTE: your trial license will expire in 13 days, 7.58 hours.
make: *** [../obj/fdtd] Error 2


Could anybody please give me a hint?
Thanks
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Oct 10, 2013 9:35 am    Post subject: Reply with quote

Looks like you're missing the CUDA x86 flag "-Mcudax86" from your build.

- Mat
Back to top
View user's profile
rvasquez



Joined: 24 Sep 2013
Posts: 7

PostPosted: Fri Oct 11, 2013 12:27 am    Post subject: Reply with quote

mkcolg wrote:
Looks like you're missing the CUDA x86 flag "-Mcudax86" from your build.

- Mat

Thanks for your answer.
In my original post the first line is:
Code:
pgcpp  -Mcudax86 -c  CudaMasterFile.cu

So I thought that maybe you mean that mpic++ also needs the -Mcudax86 flag so I've included it:
Code:
/usr/local/mpich2/bin/mpic++ -Mcudax86 -O3 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_BSD_SOURCE -I/usr/local/mpich2/include  -I/opt/pgi/linux86-64/2013/cuda/5.0/include -I/usr/local/include
 -I/usr/include -c *.c

Unfortunately the results are still the same.
Am I confused about where to put the flag?
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Oct 11, 2013 9:13 am    Post subject: Reply with quote

Hi rvasquez,

Which version of the compiler are you using? We didn't add CUDA 5.0 to CUDA x86 until the 13.9 release. Prior versions need to used CUDA 4.2.

- Mat
Back to top
View user's profile
rvasquez



Joined: 24 Sep 2013
Posts: 7

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

I've upgraded, recompiled everything and tried to build again, and now, even when I receive different errors, it still seems like CUDA is not available
Command failing:
Code:

/usr/local/bin/mpic++  -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  r
otate_help.o  fdtd.o  -o ../obj/fdtd -L/usr/local/lib -L/opt/pgi/linux86-64/2013/cuda/5.0/lib64 -L/opt/pgi/linux86-64/13.8/lib -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:38: undefined reference to `cudaGetDeviceCount'
/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'
DecompUtils.o: In function `createGPUDecompColumnComm2(int *, int)':
/home/uda/Code/bcalmrepo/CUDA_code/./DecompUtils.c:236: undefined reference to `cudaGetDeviceCount'
CudaMasterFile.o: In function `__sti___17_CudaMasterFile_cu_f25416f6':
CudaMasterFile.cu:(.text+0x46): undefined reference to `__cudaRegisterVar'
CudaMasterFile.cu:(.text+0x79): undefined reference to `__cudaRegisterVar'
CudaMasterFile.cu:(.text+0xac): undefined reference to `__cudaRegisterVar'
CudaMasterFile.cu:(.text+0xdf): undefined reference to `__cudaRegisterVar'
CudaMasterFile.cu:(.text+0x112): undefined reference to `__cudaRegisterVar'
CudaMasterFile.o:CudaMasterFile.cu:(.text+0x145): more undefined references to `__cudaRegisterVar' follow
CudaMasterFile.o: In function `__sti___17_CudaMasterFile_cu_f25416f6':
CudaMasterFile.cu:(.text+0x981): undefined reference to `__cudaRegisterFunction'
CudaMasterFile.cu:(.text+0x9c5): undefined reference to `__cudaRegisterFunction'
CudaMasterFile.cu:(.text+0xa09): undefined reference to `__cudaRegisterFunction'
CudaMasterFile.cu:(.text+0xa4d): undefined reference to `__cudaRegisterFunction'
CudaMasterFile.cu:(.text+0xa91): undefined reference to `__cudaRegisterFunction'
CudaMasterFile.o:CudaMasterFile.cu:(.text+0xad5): more undefined references to `__cudaRegisterFunction' follow
CudaMasterFile.o: In function `start_load_E__FPfiN324dim3Pv':
/home/cuda/Code/bcalmrepo/CUDA_code/./kernel_help.cu:56: undefined reference to `blockIdx'
/home/cuda/Code/bcalmrepo/CUDA_code/./kernel_help.cu:60: undefined reference to `blockIdx'
CudaMasterFile.o: In function `load_E__FPA129_fiN324dim3Pv':
/home/cuda/Code/bcalmrepo/CUDA_code/./kernel_help.cu:74: undefined reference to `blockIdx'
/home/cuda/Code/bcalmrepo/CUDA_code/./kernel_help.cu:78: undefined reference to `blockIdx'
CudaMasterFile.o: In function `load_EBuffer__FPA129_fiN224dim3Pv':
/home/cuda/Code/bcalmrepo/CUDA_code/./kernel_help.cu:91: undefined reference to `blockIdx'
CudaMasterFile.o:/home/cuda/Code/bcalmrepo/CUDA_code/./kernel_help.cu:99: more undefined references to `blockIdx' follow
CudaMasterFile.o: In function `__GBL_kernelBuffer_E(int, dim3, void *)':
...


It's very strange though.
Can anyone help me again? Thanks
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, 3  Next
Page 1 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