Last active
January 30, 2017 01:32
-
-
Save jefflarkin/5503716 to your computer and use it in GitHub Desktop.
This script allows for generating nvprof output files based on the hostname of a Cray XK7 compute node.
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 | |
# Give each *node* a separate file | |
LOG=profile_$(hostname).nvp | |
# Stripe each profile file by 1 to share the load on large runs | |
lfs setstripe -c 1 $LOG | |
# Execute the provided command. | |
exec nvprof -o $LOG $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment