Created
October 18, 2016 13:30
-
-
Save jefflarkin/0e9ea5c8a58e98e8f9cac18879fc61a3 to your computer and use it in GitHub Desktop.
OLCF Hackathon Profiling Scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# USAGE: Add between aprun options and executable | |
# For Example: aprun -n 16 -N 1 ./foo arg1 arg2 | |
# Becomes: aprun -n 16 -N 1 ./cpu_profile.sh ./foo arg1 arg2 | |
# Give each *rank* a separate file | |
LOG=cpu_profile_$ALPS_APP_PE.nvprof | |
# Stripe each profile file by 1 to share the load on large runs | |
if [ ! -f "$LOG" ] ; then | |
lfs setstripe -c 1 $LOG | |
fi | |
export TMPDIR=$(mktemp -d -p $PWD) | |
lfs setstripe -c 1 $TMPDIR | |
# Execute the provided command. | |
exec pgprof --cpu-profiling on -o $LOG $* | |
rm -rf $TMPDIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# USAGE: Add between aprun options and executable | |
# For Example: aprun -n 16 -N 1 ./foo arg1 arg2 | |
# Becomes: aprun -n 16 -N 1 ./metrics.sh ./foo arg1 arg2 | |
# Give each *rank* a separate file | |
LOG=metrics_$ALPS_APP_PE.nvprof | |
# Stripe each profile file by 1 to share the load on large runs | |
if [ ! -f "$LOG" ] ; then | |
lfs setstripe -c 1 $LOG | |
fi | |
export TMPDIR=$(mktemp -d -p $PWD) | |
lfs setstripe -c 1 $TMPDIR | |
# Execute the provided command. | |
exec nvprof --analysis-metrics -o $LOG $* | |
rm -rf $TMPDIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# USAGE: Add between aprun options and executable | |
# For Example: aprun -n 16 -N 1 ./foo arg1 arg2 | |
# Becomes: aprun -n 16 -N 1 ./timeline.sh ./foo arg1 arg2 | |
# Give each *rank* a separate file | |
LOG=timeline_$ALPS_APP_PE.nvprof | |
# Stripe each profile file by 1 to share the load on large runs | |
if [ ! -f "$LOG" ] ; then | |
lfs setstripe -c 1 $LOG | |
fi | |
export TMPDIR=$(mktemp -d -p $PWD) | |
lfs setstripe -c 1 $TMPDIR | |
# Execute the provided command. | |
exec nvprof -o $LOG $* | |
rm -rf $TMPDIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment