PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

IPA inhibited: no main routine
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
tyler



Joined: 29 Jan 2005
Posts: 3

PostPosted: Sat Jan 29, 2005 10:49 pm    Post subject: IPA inhibited: no main routine Reply with quote

When I compile with -Mipa=fast I get this message after linking :

Code:
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.

What does this mean and how do I fix it?
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Jan 31, 2005 11:38 am    Post subject: Reply with quote

Hi Tyler,

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

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



Joined: 29 Jan 2005
Posts: 3

PostPosted: Mon Jan 31, 2005 2:45 pm    Post subject: Reply with quote

I do have a main in Main.cpp and it is compile with -Mipa=fast
here is the complete log of my build (it's not too long):

Code:
pgCC -Iinclude  --mp -fastsse -O4 -tp=athlonxp  -Minline=levels:10 -Mipa=fast  -c -o obj/GA.o src/GA.cpp
pgCC -Iinclude  --mp -fastsse -O4 -tp=athlonxp  -Minline=levels:10 -Mipa=fast  -c -o obj/KinematicModel.o src/KinematicModel.cpp
pgCC -Iinclude  --mp -fastsse -O4 -tp=athlonxp  -Minline=levels:10 -Mipa=fast  -c -o obj/Main.o src/Main.cpp
pgCC -Iinclude  --mp -fastsse -O4 -tp=athlonxp  -Minline=levels:10 -Mipa=fast  -c -o obj/NeuralConnections.o src/NeuralConnections.cpp
pgCC -Iinclude  --mp -fastsse -O4 -tp=athlonxp  -Minline=levels:10 -Mipa=fast  -c -o obj/NeuralController.o src/NeuralController.cpp
pgCC -Iinclude  --mp -fastsse -O4 -tp=athlonxp  -Minline=levels:10 -Mipa=fast  -c -o obj/NeuralPathways.o src/NeuralPathways.cpp
pgCC -Iinclude  --mp -fastsse -O4 -tp=athlonxp  -Minline=levels:10 -Mipa=fast  -c -o obj/TGA.o src/TGA.cpp
pgCC -Iinclude  --mp -fastsse -O4 -tp=athlonxp  -Minline=levels:10 -Mipa=fast  -c -o obj/Unit.o src/Unit.cpp

linking ...
pgCC  obj/GA.o  obj/KinematicModel.o  obj/Main.o  obj/NeuralConnections.o  obj/NeuralController.o  obj/NeuralPathways.o  obj/TGA.o  obj/Unit.o --mp -fastsse -O4 -tp=athlonxp  -Minline=levels:10 -Mipa=fast  -lrandomae -lrt    -o bin/evolve
C++ prelinker: executing: /opt/pgi/linux86/5.2/bin/pgCC -Iinclude --mp -fastsse -fast -Mvect=sse -Mscalarsse -Mcache_align -Mflushz -O4 -tp=athlonxp -Minline=levels:10 -Mipa=fast -o obj/GA.o -c src/GA.cpp

IPA inhibited: no main routine


here is Main.cpp:

Code:
#include "GA.h"
#include "Utilities.h"
#include "Profiler.h"

int main()
{
  RandomInit(RANDOM_SEED);

  Profiler prof;

  GA ga;

  prof.Start(); 
  ga.Start();
  prof.End();
 
  prof.PrintResult();
 
  return 0;
}


thanks for your time
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Feb 01, 2005 12:53 pm    Post subject: Reply with quote

Hi Tyler,


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.

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



Joined: 29 Jan 2005
Posts: 3

PostPosted: Tue Feb 01, 2005 2:13 pm    Post subject: Reply with quote

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

thank you ,
David
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 1, 2  Next
Page 1 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