PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Upgrading cuda toolkit from 4 to 5 with PGI 12.3 VS 2010
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
mkcolg



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

PostPosted: Wed Jan 16, 2013 4:06 pm    Post subject: Reply with quote

Quote:
I am suspecting this due to me not deallocating the device matrices before the end of the program, is that correct?
Probably not. The memory will be freed once your program exits. More likely you have some uninitialised memory. The memory may happen to be zero the first time you run the program, but some other value the next.

Quote:
0: DEALLOCATE: memory at 0000000000000000 not allocated
This mean that the memory has already been deallocated or was never allocated in the first place.

- Mat
Back to top
View user's profile
Dolf



Joined: 22 Mar 2012
Posts: 127

PostPosted: Wed Jan 16, 2013 4:54 pm    Post subject: Reply with quote

Quote:
Probably not. The memory will be freed once your program exits. More likely you have some uninitialised memory. The memory may happen to be zero the first time you run the program, but some other value the next.


how can overcome this problem??

thanks,
Dolf
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Jan 16, 2013 5:48 pm    Post subject: Reply with quote

Probably the best way is to compile in emulation mode with floating point trapping enabled (-Mcuda=emu -g -Ktrap=fp). If you're correct that it's a divide by zero, this should pin point the place where it occurs. Otherwise, run the same binary in the debugger, PGDBG, and see if you can determine at what point the NANs start occurring. From there back track until you find the cause.

- Mat
Back to top
View user's profile
Dolf



Joined: 22 Mar 2012
Posts: 127

PostPosted: Wed Jan 16, 2013 8:39 pm    Post subject: Reply with quote

Quote:
Probably the best way is to compile in emulation mode with floating point trapping enabled (-Mcuda=emu -g -Ktrap=fp). If you're correct that it's a divide by zero, this should pin point the place where it occurs.


I did compile the code in debug mode using the above keys (-Mcuda=emu -g -Ktrap=fp). it takes longer time to calculate the results. in the middle it gave me the error: PGI debug engine
Process 0: signalled FLT_INVALID_OPERATION at 0x4019ca1d, function _fmth_i_dlog, file 418, line 0

which does not make alot of sense to me. I used to pass this point with no errors when compiling without emu mode.

can you please explain? I am running out of ideas now.
Dolf
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Jan 17, 2013 10:10 am    Post subject: Reply with quote

Think of "FLT_INVALID_OPERATION" as a Windows catch all for a non-specific floating point exception. Can you track down which "log" call is throwing this exception?

It may be a acceptable exception (like an underflow) in your code that can be ignored. However, you should look at what value is being passed to log and how the results are being used.

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