PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

issue compiling for cuda

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
vibrantcascade



Joined: 04 Aug 2011
Posts: 28

PostPosted: Thu Aug 09, 2012 11:19 am    Post subject: issue compiling for cuda Reply with quote

I've never seen this one before:

[leiderml@ebwilson-mpi ~]$ pgfortran -Mcuda=cc20 ibe-i4six-Cuda.f
pgnvd-Fatal-/shared/pgi/linux86-64/2011/cuda/3.1/bin/ptxas TERMINATED by signal 11
Arguments to /shared/pgi/linux86-64/2011/cuda/3.1/bin/ptxas
/shared/pgi/linux86-64/2011/cuda/3.1/bin/ptxas -arch=sm_20 -m64 -o /tmp/pgcudaforqgOeWVzTsHme.bin /tmp/pgcudaforqgOeWHThsljZ.ptx
PGF90-F-0000-Internal compiler error. pgnvd job exited with nonzero status code 0 (ibe-i4six-Cuda.f: 881)
PGF90/x86-64 Linux 11.5-0: compilation aborted


Any ideas? The line number it gives is simply the last line of the last function before the end of module statement. I'm not seeing a segmentation fault so I don't think I'm accessing any arrays outside of their bounds. Could it simply be taking too long and timing out on compile as this program tends to take a while to compile?

Thanks!
Morgan
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Aug 10, 2012 8:58 am    Post subject: Reply with quote

Hi Morgan,

This is a problem with an old NVIDIA device assembler (ptxas) that was fixed in newer CUDA versions, though I've forgotten if it was fixed in CUDA 3.2 or CUDA 4.0. Can you try using CUDA 3.2, i.e. "-Mcuda=cc20,3.2"? If that doesn't work, you'll need to update you compiler version to at least 11.6, which is when we first shipped CUDA 4.0.

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



Joined: 04 Aug 2011
Posts: 28

PostPosted: Thu Aug 16, 2012 7:21 am    Post subject: Reply with quote

Thanks for the help Mat! Once my admin comes back I'll have them upgrade as we're still using 11.5.

1 more quick question. I run into this same problem with gfortran and pgfortran but not ifort. Basically, it appears that the compiler builds up a buffer of 50 lines before it will do any writing to file. The problem is my code sometimes takes weeks to evaluate an integral, and with functions that have triple infinite sums that converge particularly slow I might only get 1 intermediate value a day after a certain point. Is there any way to turn off the buffering so that it writes to file right away or am I forced to put flush statements everywhere?

Thanks!
Morgan
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Aug 16, 2012 1:33 pm    Post subject: Reply with quote

Hi Morgan,

It's actually the OS that's buffering the I/O so you need to make a system call, setvbuf3f, to change the behaviour of the buffer. You can find the full details in the PGI Fortran Reference Guide under the lib3f functions (http://www.pgroup.com/doc/pgifortref.pdf).

Note that this not a standardize method hence you may have issue using when compiling with other compilers or on systems that doesn't support setvbuf. Also, stdio is not guaranteed to honour your request.

- Mat
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
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