PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

*allowing* array overflow

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



Joined: 21 Jan 2010
Posts: 33

PostPosted: Fri Aug 31, 2012 10:55 am    Post subject: *allowing* array overflow Reply with quote

I have a very odd problem. I am trying to run a code that relies on array overflow to work properly. I did not write this code! The originators had to compile it with the flag "tp=piii" to force the compiler to refrain from optimizations that defeated the array overflow. I guess the idea is that compilers written for the old P3 were too primitive to do this sort of thing. Now, when I try to do the same thing, I get the message "pgf90-Fatal --tp piii is not supported in this installation." So I can't do the same thing.

So: Does pgf90 in its default operation defeat the sort of array overflow the code needs? The people I am working with obviously think it does. And, if it does, could there be some other flag(s) I could use to get what I need from the "-tp=piii" flag?

Bet you never thought you would get a question like this! Just think how I feel.
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Aug 31, 2012 2:26 pm    Post subject: Reply with quote

Hi Cablesb,

Quote:
Does pgf90 in its default operation defeat the sort of array overflow the code needs?
First, by "overflow", I'm assuming you mean reading/writing beyond an array's bounds. Unless you add bounds checking (-Mbounds, -C) the compiler isn't going to prevent the program from writing/reading outside the bounds of an array. I suspect that the problem is that the original authors made some assumptions about data layout?

How does the code fail? Most likely it's more to do with an optimization that isn't performed when targeting a Pentium 3 (-tp=piii), or that we target SSE for all targets except for a P3 which uses the old x87 FPU. What happens if you compile at "-O0 -tp=px-64" (i.e. no optimization and target a generic 64-bit system)?

Note that we do still support the "-tp=piii" option. However, I suspect that your system does not have the OS's 32-bit compatibility libraries installed. Hence, when you installed the PGI compilers, our 32-bit compilers were not install. So if there is no other way to get this code working, please go back and get the 32-bit compilers installed.

- Mat
Back to top
View user's profile
cablesb



Joined: 21 Jan 2010
Posts: 33

PostPosted: Tue Sep 04, 2012 9:44 am    Post subject: Reply with quote

Yes, I mean writing beyond the array's bounds. And, yes, it look slike I don't have the 32-bit libraries in place. Question: When I re-install PGI, I don't want to lose anything, especially the CUDA capabilities that we paid for. Is there a particularly safe way to re-install, or will everything be taken care of automatically? Thanks.
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Sep 04, 2012 12:39 pm    Post subject: Reply with quote

Quote:
Is there a particularly safe way to re-install, or will everything be taken care of automatically?
It shouldn't a problem. The installer would just overwrite existing PGI files with the identical file. The one configuration file, localrc, would be regenerated but would just produce the same file.

- 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