howto:pgo
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
faq:pgo [2015/01/23 12:56] – created faq on profile guided optimization vondele | howto:pgo [2015/08/28 14:43] – update for makefile based testing vondele | ||
---|---|---|---|
Line 9: | Line 9: | ||
3. Build the code with extra instrumentation (this binary is slow, and used only for training purposes) | 3. Build the code with extra instrumentation (this binary is slow, and used only for training purposes) | ||
make -j ARCH=local VERSION=sopt PROFOPT=-fprofile-generate | make -j ARCH=local VERSION=sopt PROFOPT=-fprofile-generate | ||
- | 4. Run the binary either on a specific testcase, or on the full testsuite | + | 4. Run the binary either on a specific testcase, or on the full testsuite for good coverage. Only those parts of the code executed during the training run can benefit from PGO. This will write additional files (.gcda) files in the obj directory. |
- | ../../exe/local/cp2k.sopt -i test.inp | + | make -j ARCH=local VERSION=sopt PROFOPT=-fprofile-generate |
5. Remove the old instrumented object files, retaining the .gcda files (i.e. clean) | 5. Remove the old instrumented object files, retaining the .gcda files (i.e. clean) | ||
- | make -j ARCH=local VERSION=sopt clean | + | make -j ARCH=local VERSION=sopt |
- | 6. Recompile to generate | + | 6. Recompile to build the optimized binary |
make -j ARCH=local VERSION=sopt PROFOPT=-fprofile-use | make -j ARCH=local VERSION=sopt PROFOPT=-fprofile-use |
howto/pgo.txt · Last modified: 2020/08/21 10:15 by 127.0.0.1