Optimizing C/C++ Applications with IBM SDK Build Advisor
This is a brief text about how to use the IBM SDK Build Advisor to optimize C/C++ aplications on Power Servers. You can get the project and learn how to run on the link below:
Running seismic applications without optimization flags
Here are some results on Power Machine before the optimization process.
Importing a C\C++ Project to IBM SDK
Before you begin, make sure there is a Makefile inside your project. Now, inside the SDK:
1. Go to File > Import 2. In the import window, expand C\C++ and click in Existing Code as Makefile Project 3. Now go to Browse next to the Existing code Location. 4. Type a name for your project 5. Locate the code and then click OK. 6. Back to the Import Existing Code window, click the Advanced Toolchain Version corresponding to the one you have installed on the Power Machine. 7. Click Finish
Using the Build Advisor
- Right Click on the project, go to Properties
- Select the build advisor
- Enable Enable extra advice and then Finish.
- Right click on the project and build. The suggestions will appear.
After using the flags that the SDK suggested
-std=c99 -Ofast -fpeel-loops -flto -fopenmp -mcmodel=medium -ftree-vectorize -mcpu=power8 -mtune=power8 -funroll-loops
I got the following results:
As you can see, Build Advisor is very effective.
Post written by Guilherme Lucas. You can see some of my work at https://github.com/Guilhermeslucas .