PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

compiling with -Mpfi -Mpfo option

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



Joined: 12 Jul 2005
Posts: 2

PostPosted: Tue Jul 26, 2005 9:56 am    Post subject: compiling with -Mpfi -Mpfo option Reply with quote

hy,
i want to compile my program with the -Mpfi option and re-compile it after using the -Mpfo option, but the compiler crash and i don't know why...
if someone can help me..
thanks
Greg
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Jul 26, 2005 11:36 am    Post subject: Reply with quote

Hi Greg,

What error are you getting? Is this a community application, or your own code? What type of system are you using?

Thanks,
Mat

Step for using Profile Guided Feedback:
1) Compile with your best optimizations plus "-Mpfi"
2) Run your program with a representative data set to create a "pgfi.out" file.
3) Clean your build making sure that the "pgfi.out" file is not removed.
4) Re-compile as you did in step 1 but replace "-Mpfi" with "-Mpfo".
Back to top
View user's profile
odd_greg



Joined: 12 Jul 2005
Posts: 2

PostPosted: Wed Jul 27, 2005 12:33 am    Post subject: Reply with quote

Hi Mat,
I try with your method and it works...
In fact i try to compile my own code on linux (we actually work on opteron dual core)... i've got an executable to compile and i make a library...i think the first time i try it didn't work because i also compile my library using -Mpfi/Mpfo...i just try to compile just my executable with -Mpfi/Mpfo and it works...
Do you know if it is possible to also compile my library with this option???
Thanks,
Greg
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Jul 27, 2005 2:08 pm    Post subject: Reply with quote

Hi Greg,

Quote:
Do you know if it is possible to also compile my library with this option???


Profile Guided Feedback (PFO) can be used with libraries, however, you'll need to link the library with a representative executable in order to generate the pgfi.out file.

The steps would be as follows:

1) Add -Mpfi to the build options of the library as one would for an executable.
2) Build the library.
3) Add -Mpfi to the link options of the executable. You can add -Mpfi to the compilation if you want to profile the execuatable as well.
4) Build the executable.
5) Run the executable. 'pgfi.out' appears in the execution area.
6) Copy 'pgfi.out' to the build directory for the library.
7) Rebuild the library with -Mpfo.
8) If needed, you can also rebuild the executable.

Hope this helps,
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