CrayPat -- Cray performance analysis tool
CrayPat is the optional performance analysis tool for evaluating program execution on Cray systems. CrayPat consists of three major components:
- pat_build - used to instrument the program to be analyzed (see "man pat_build")
- pat_report - a standalone text report generator that can be use to further explore the data generated by instrumented program execution (see "man pat_report")
- Apprentice2 - a graphical analysis tool that can be used, in addition to pat_report to further explore and visualize the data generated by instrumented program execution (see "man app2")
EXAMPLE:
1. Load the newest version of CrayPat:
% module load xt-craypat/4.2beta apprentice22. Compile your application:
% make clean % make3. Instrument application to request a sampling profile:
% pat_build -O apa a.outThis will create an executable "a.out+pat".
4. Run your application (in batch) using the executable "a.out+pat".
This will create a file "a.out+pat+<*>.xf".
5. Create Sampling report files:
% pat_report a.out+pat+<*>.xf > my_report.txtThis command will automatically create a report file "a.out+pat+<*>.ap2", which can be viewed by Apprentice2.
The command will also create two text files in ascii format: "a.out+pat+<*>.apa" and "my_report.txt".
6. For Hardware Counting, instrument application for further analysis:
% pat_build -O a.out+pat+<*>.apaThis will create an executable "a.out+apa".
7. Modify run script to run the executable "a.out+apa", and add the environment variables
export PAT_RT_MPI_SYNC=0 export PAT_RT_HWPC=[2|3|...]Running this instrumented application will create a file "a.out+apa+<*>.xf".
8. Convert raw data:
% pat_report a.out+apa+<*>.xf > my_hwcp_report.txtThis command will automatically create a report file "a.out+apa+<*>.ap2", which can be viewed by Apprentice2.
The command will also create a new text file in ascii format: "my_hwcp_report.txt"
9. View the results by Apprentice2:
% app2 a.out+pat+<*>.ap2 & -for visualizing sampling results
% app2 a.out+apa+<*>.ap2 & -for visualizing hardware counting results
Apprentice2 generates a variety of interactive graphical reports. For more info, see "man app2".
More information can be found at manpages or at http://docs.cray.com.
