PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Precision Error setting array to zero
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: 6218
Location: The Portland Group Inc.

PostPosted: Tue Mar 06, 2012 5:18 pm    Post subject: Reply with quote

Hi khea_actua1,

I've been talking with our lead Tools Engineer (Don) and Compiler Architect (Steven) about this. We're not sure a multi-users screen would help. Possibly a phone call, but let's first try a few things.

Don wants you to try the following:

(1) modify the source code to print the contents of the array at the source line immediately after the source line where the array is initialized, rebuild and run. See if the array is all zeroes.

(2) run the same executable under PGDBG. set a breakpoint on the source line immediately following the source line where the array is initialized. Print the array using the pgdbg 'print' command. See if the array is all zeros when viewed this way, and/or if it is the same as in (1)

** If the array is *not* all zeroes in #1, it may be a compiler bug, and I'd pass it off to Steven.
** If the array *is* all zeroes in #1, but *not* in #2, it is likely a debugger bug, and I'd provide a new set of instructions.
** If the arrays *is* all zeroes in both #1 and #2, continue to #3

(3) re-run the original example under the debugger that shows the non-zero element.

(4) re-run the original example that shows the non-zero element again, but stop at the initialization step and set a hardware watchpoint on the element

pgdbg> hwatch aerop1_d(25,11)
pgdbg> cont

If the array element is being clobbered, the hardware watchpoint should catch it. If it does, then capture a stack traceback ('stack' command) to find the offending code.


Steven also wanted to know the dimensions of aerop1_d.

Thanks,
Mat
Back to top
View user's profile
khea_actua1



Joined: 06 Nov 2008
Posts: 42
Location: Carleton University

PostPosted: Wed Mar 07, 2012 8:46 am    Post subject: Reply with quote

Sounds good. I'll do that now (and update this posting)

Results:
1-2: Done by outputting these variables to a file, the executable was run from the shell, and I attached to it in order to be able to read these values.
Code:

Code: aerop1_d( 24,  11)        = 0.000000000000000
Debugger: aerop1_d( 24,  11)    = 2.827528121097894e-315


Same goes for other values, e.g., my input variable icob has a messed up value in the stack, but still prints out the proper value when printed from the code.

4. The hwatch never causes a break. (even when looping over the aerop1_d = zerodp)

Though, sometimes I get this:
Code:
pgdbg> hwatch aerop1_d(24,11)
Unable to set dr0 to addr b0f8cb992e17cd4c.
ERROR: Unable to set hardware watchpoint.


I notice though, if I set element (24,11) to another element that does display 0, it then stays as zero.

The dimensions of this array are (28,12)

About the stack, that's also an issue I brought up in these messages: the values in this stack seem way off. But about your comment, won't the stack just show me all the interface variables up to this routine? I find it doesn't show me any code inside this routine..
Back to top
View user's profile
khea_actua1



Joined: 06 Nov 2008
Posts: 42
Location: Carleton University

PostPosted: Fri Mar 09, 2012 8:32 am    Post subject: Reply with quote

Hi, any news on this?
Back to top
View user's profile
khea_actua1



Joined: 06 Nov 2008
Posts: 42
Location: Carleton University

PostPosted: Mon Mar 12, 2012 3:00 pm    Post subject: Reply with quote

Any news yet? Sort of paid The Portland Group 1000s$ of dollars for this debugger..
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Mar 12, 2012 3:29 pm    Post subject: Reply with quote

Without a reproducing example, there's not much more we can do via the UF. I gave Don your email address and he'll contact you as soon as he can.

- 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