PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

-g flag causes program to give NaNs

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



Joined: 02 Oct 2009
Posts: 13

PostPosted: Wed Apr 30, 2014 8:53 am    Post subject: -g flag causes program to give NaNs Reply with quote

Hi,

I have a fortran application and I compile it with following flags,

-fast -Mr8 -Mcuda -Minfo=all -Mcache_align -ta=nvidia,cc20 -traceback

Code runs fine with these flags.
When I add the flag -g for debugging information, the code gives NaNs.
Any idea as to why this is happening.

I use,
pgf90 14.3-0 64-bit target on x86-64 Linux -tp nehalem
on c2050 using openmpi-1.7.4.

Thanks,
Amit
Back to top
View user's profile
cparrott



Joined: 02 May 2011
Posts: 146

PostPosted: Wed Apr 30, 2014 12:30 pm    Post subject: Reply with quote

Hi Amit,

There are a number of possible reasons that this could be happening. For example, it could be caused by using uninitialized variables in your application, or it could be an issue with the compiler.

If you have a way to provide a small test case that reproduces the error, we would be happy to take a look at it . If you could share the application with us, we could potentially take a quick look at it as well. Feel free to send it to trs@pgroup.com, attention Chris.

Best regards,

+chris
Back to top
View user's profile
amitamritkar



Joined: 02 Oct 2009
Posts: 13

PostPosted: Fri May 02, 2014 2:52 pm    Post subject: Reply with quote

Unfortunately, I cannot share the application. Also, its a large application so difficult to come up with a small test application.

Is there any option to check if I have uninitialized variables in cuda fortran?

Thanks,
Amit
Back to top
View user's profile
cparrott



Joined: 02 May 2011
Posts: 146

PostPosted: Mon May 05, 2014 10:00 am    Post subject: Reply with quote

Hi Amit,

Normally I would use Valgrind's memcheck tool to check for these kinds of problems on a CPU application. However, the use of the GPU in your application throws some wrinkles into that. It looks like someone has developed a Cudagrind extension to Valgrind that works on GPUs:

https://www.hlrs.de/organization/av/spmt/research/cudagrind/

I've never tried it, and can make no claims or warranties about how well it works. However, it might be worth a look to see if it turns up any useful information about your application.

Good luck,

+chris
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