PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Course

problem with option -tp in pgf77 and pgf90 6.0
Goto page Previous  1, 2
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message

Joined: 13 Jul 2004
Posts: 20

PostPosted: Tue Nov 29, 2005 12:16 pm    Post subject: Solution Reply with quote

Hi again. Actually, you've found the solution already, but I'll explain anyway. I was able this time to reproduce the problem you've found, and tested the solution, as described here.

When the driver looks for the install directory, it follows symbolic links until it finds the main 'rc' file; for linux, this would be .pgccrc, .pgf90rc, .pgCCr, .pgf95rc, etc., depending on the compiler. When it finds those, it assumes it's found the install directory. If you remove these links from /usr/local/bin, the compilers should work as expected. You will also find that the other links in /usr/local/bin, such as the actual compilers (pgc, pgc_ex, pgf901, pgf902, pgftn, etc.) will never get used, as well as the other rcfiles in that directory, so they could be removed as well.

Years ago, the compiler driver depended on the setting of the $PGI environment variable to find the installation directory. As you might imagine, we had no end of problems from users who either did not set the variable, or set it to one value, then changed their path, expecting to get the compiler from the new path (but instead it used the old PGI variable setting), or used a full path to a version of the compiler. We chose to use the path instead, to require fewer changes to a user's settings.

- Michael Wolfe
Back to top
View user's profile

Joined: 27 Oct 2004
Posts: 4

PostPosted: Wed Nov 30, 2005 1:22 am    Post subject: Reply with quote

Hi mwolfe,

Thank you for your response. I see your point, but how about adding a lookup in $PGI AFTER trying to find the install directory from the path fails? Or the other way around, if nothing is found under $PGI, then try to figure it out by the path. Btw. what is the environment variable really used for currently?

Anyway, I removed the additional files and just left the few compiler frontends in "bin". It is just simpler to renew one link to the whole "bin" directory after an upgrade than to do that for each frontend individually.


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
Goto page Previous  1, 2
Page 2 of 2

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