When I compile with -Mipa=fast I get this message after linking :
IPA inhibited: no main routine
I use -c --mp -fastsse -O4 -tp=athlonxp -Minline=levels:10 -Mipa=fast when compiling my single files and also -Mipa=fast when linking. I have found no references to this problem on the web.
This error occurs when the main program was not compiled with IPA. Please double check that all your files were compiled using “-Mipa=fast”.
If all your files were compiled with IPA, would it possible to send a complete log of your build to trs@pgroup.com? (I’m assuming it would be too long to be posted here.)
Let’s try some things to determine where the problem is. First “–mp” is a deprecated flag and shouldn’t be used (Note, for openMP the flag is “-mp”). Try compiling without “–mp” to see if it is causing the problem. Next, try compiling with just “-O2 -Mipa=fast”. If this works, then start adding back the other flags. Let me know at what point it starts to fail.
As a side note, I find IPA doesn’t always help the performance of C++ code so you might be fine without it. Also, if you don’t use exception handling, I find that adding “–no_exceptions” can help significantly.
I tried “-Mipa=fast -O2” and it still complained about duplicate symbols, but with just “-Mipa=fast” it worked, and as you said it gave me no performance gain. So far the best performance was obtained with “-mp -O4 -fastsse -tp=athlonxp -Minline=levels:10”, almost doubling the execution speed (as compared to no optimization).
One last question: I tried the multi-threaded version of my program (with pthread, dual Athlon MP) and got these results:
-with gcc :
serial → 41.67 sec
mt → 23.91 sec (174%)
-with intel_cc :
serial → 31.22 sec
mt → 21.49 sec (145%)
-with pgCC :
serial → 43.74 sec
mt → 55.49 sec (79%)
why does the pgCC version drop in speed when I use my two processors (I checked and the mt version with pgCC does in fact max out my cpu usage to 99% on both cpus)?
Unfortunately, I don’t know why our openMP performance actually degrades at two threads. I’ve seen this issue on SuSE 9.0, but this is a problem with pthreads and occurs with all compilers. We’d need to work with the code in order to determine what’s going on, since we’ve obviously got an issue. Admittedly, our C++ perfomance does lag. We’ve mostly focused our efforts on Fortran and C performance. You’ll some gains with the upcoming 6.0 compiler, but even more with future releases. Granted, this doesn’t help you now. We would appreciate if you would submit a bug report to trs@pgroup.com so we can diagnosis and fix the problem.