Last active
December 16, 2015 01:39
-
-
Save jefflarkin/5356512 to your computer and use it in GitHub Desktop.
Quick trick for getting different cuda command-line profiler log files per node 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 ./profile.sh ./foo arg1 arg2 | |
# Enable command-line profiler | |
export COMPUTE_PROFILE=1 | |
# Set output to CSV (optional) | |
export COMPUTE_PROFILE_CSV=1 | |
# Give each *node* a separate file | |
export COMPUTE_PROFILE_LOG=cuda_profile_$(hostname).log | |
# Stripe each profile file by 1 to share the load on large runs | |
lfs setstripe -c 1 $COMPUTE_PROFILE_LOG | |
# Execute the provided command. | |
exec $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment