Last active
June 5, 2017 20:53
-
-
Save jefflarkin/678a707c4217dab14156 to your computer and use it in GitHub Desktop.
Script for gathering an nvprof timeline on a Cray XK7
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 ./nvprof.sh ./foo arg1 arg2 | |
export PMI_NO_FORK=1 | |
# Give each *rank* a separate file | |
LOG=timeline_$ALPS_APP_PE.nvprof | |
# Set the process and context names | |
NAME="MPI Rank: %q{ALPS_APP_PE}" | |
# Stripe each profile file by 1 to share the load on large runs | |
if [ !-f $LOG ] ; then lfs setstripe -c 1 $LOG ; fi | |
# Execute the provided command. | |
exec nvprof --process-name "$NAME" --context-name "$NAME" -o "$LOG" $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment