Skip to content

Instantly share code, notes, and snippets.

@jefflarkin
Last active January 30, 2017 01:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jefflarkin/5503716 to your computer and use it in GitHub Desktop.
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.
#!/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