4. Code blocks run consecutively are adjacent
in target program
• better cache optimization, less branching overhead
• for conditional statements: block placement
• for iterative statements: loop unrolling
• for function calls: inlining
Frequently used variables have contiguous
memory in address space
5.
6. Modern supercomputer characteristics
• Shared file system
• Distributed memory
• Multiple processors
How to prevent one file from being
overwritten by another?
How to aggregate data?
7. Processor IDs are shared within cluster, but
unique within node
• Include hostname in .profraw file
Implementation varies based on OS
• Unix (uname) vs. Windows (gethostname)
• Header file ensures compatibility with both
Created script for testing
• “%h” conversion works from any location in file name
Modified patch in response to community
feedback
• Final revision was accepted two weeks ago
8. Supercomputing nodes have processes
communicate using MPI
• Each process is assigned unique rank
Useful functions
• MPI_Finalize: called on all processes at end of
program
• MPI_Reduce: each process sends data to
specified buffer on single root process
Functions have MPI_* and PMPI_* versions
• MPI_* is weak symbol: hook additional
functionality
9. Give each process flag indicating whether
it should write profiling data
If MPI is used
1. Give one process sum of data from all
processes
2. Set flag only on this process
Flag is included in same file as
hooked MPI_Finalize so linker will
use new definition
11. File Truncation
Initial version of compiler runtime created
empty profiling data file at program startup
•
MPI_Comm_rank hasn’t been called:
don’t know which processor will be root
Fix by setting flag for file truncation, not
creation
•
13. Tested on Livermore Unstructured
Lagrangian Explicit Shock Hydrodynamics
14. Ensuring code compatibility for different
operating systems and computing
environments
Creating test scripts for new functionality
Enhanced understanding of compilers
Increased proficiency with Git, CMake,
Unix, MPI, and C programming