PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

CUDA Fortran samples compilation problem - sgemm.cuf

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
hupca_ovidiu



Joined: 16 Oct 2009
Posts: 3

PostPosted: Tue Oct 27, 2009 7:25 am    Post subject: CUDA Fortran samples compilation problem - sgemm.cuf Reply with quote

Hello,

I am trying to compile the sgemm.cuf example in the pgi/../etc/samples directory.

When compiled with pgfortran sgemm.cuf , it compiles and runs successfully.

When compiled with pgfortran -O2 sgemm.cuf , it compiles, but it throws the following error at runtime:

Quote:

Device:GeForce 8600M GT, 950.0 MHz clock, 255.3 MB memory.

65536 errors were encountered
256x256 * 256x256: 0.008 ms 3998.612 GFlops/s


When compiled with pgfortran -Mcuda=emu sgemm.cuf, the compilation fails with
Quote:

/opt/pgi/linux86-64/9.0-4/lib/libpgmp.a(setaff.o): In function `_mp_setaff':
setaff.c:(.text+0xde): undefined reference to `numa_available'
setaff.c:(.text+0xe7): undefined reference to `numa_set_localalloc'
/opt/pgi/linux86-64/9.0-4/lib/libpgmp.a(setaff.o): In function `__pgi_nnodes':
setaff.c:(.text+0xf6): undefined reference to `numa_available'
setaff.c:(.text+0xff): undefined reference to `numa_max_node'
/opt/pgi/linux86-64/9.0-4/lib/libpgmp.a(setaff.o): In function `_mp_malloc_local':
setaff.c:(.text+0x123): undefined reference to `numa_available'
setaff.c:(.text+0x13e): undefined reference to `numa_alloc_local'


I am running Fedora 10 X86_64, using PGI 9.0-4 and the contents of sitenvrc is
Quote:

set NVOPEN64DIR=/usr/local/cuda/open64/lib;
set CUDADIR=/usr/local/cuda/bin;
set CUDALIB=/usr/local/cuda/lib;
set GCCVERSION=40301;


CUDA 2.2 and NVIDIA driver version NVIDIA-Linux-x86_64-185.18.14


Thank you for your help
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Oct 27, 2009 4:28 pm    Post subject: Reply with quote

Hi hupca_ovidiu,

Quote:
Device:GeForce 8600M GT, 950.0 MHz clock, 255.3 MB memory.

65536 errors were encountered
256x256 * 256x256: 0.008 ms 3998.612 GFlops/s

It seems the timing is too low, indicating that the kernel didn't actually get executed. Try adding a call to "cudaGetLastError" in the code to see what the error is. For example:
Code:
 
  ...
  integer cuError
  character*120 errMsg
  ....
  cuError = cudaGetLastError()
  if (cuError .ne. 0) then
     errMsg = cudaGetErrorString(cuError)
     print *, trim(errMsg)
  end if


As for the undefined references, these are references in the Numa library which should be linked automatically. Can you post the "ld" (linker) output from the output of "pgfortran -Mcuda=emu sgemm.cuf -v"?

Thanks,
Mat
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
Page 1 of 1

 
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