Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8411673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:28:51+00:00 2026-06-10T00:28:51+00:00

I had a quick look on the forums and I don’t think this question

  • 0

I had a quick look on the forums and I don’t think this question has been asked already.

I am currently working with an MPI/CUDA hybrid code, made by somebody else during his PhD.
Each CPU has its own GPU.
My task is to gather data by running the (already working) code, and implement extra things.
Turning this code into a single CPU / Multi-GPU one is not an option at the moment (later, possibly.).

I would like to make use of performance profiling tools to analyse the whole thing.


For now an idea is to have each CPU launch nvvp for its own GPU and gather data, while another profiling tool will take care of general CPU/MPI part (I plan to use TAU, as I usually do).

Problem is, launching nvvp’s interface 8 simultaneous times (if running with 8 CPU/GPUs) is extremely annoying. I would like to avoid going through the interface, and get a command line that directly writes the data in a file, that I can feed to nvvc’s interface later and analyse.

I’d like to get a command line that will be executed by each CPU and will produce for each of them a file giving data about their own GPU. 8 (GPUs/CPUs) = 8 files.
Then I plan to individually feed and analyse these files with nvcc one by one, comparing the data manually.

Any idea ?

Thanks !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T00:28:53+00:00Added an answer on June 10, 2026 at 12:28 am

    Take a look at nvprof, part of the CUDA 5.0 Toolkit (currently available as a release candidate). There are some limitations – it can only collect a limited number of counters in a given pass and it cannot collect metrics (so for now you’d have to script multiple launches if you want more than a few events). You can get more information from the nvvp built-in help, including an example MPI launch script (copied here but I suggest you check out the nvvp help for an up-to-date version if you have anything newer than the 5.0 RC).

    #!/bin/sh
    #
    # Script to launch nvprof on an MPI process.  This script will
    # create unique output file names based on the rank of the 
    # process.  Examples:
    #   mpirun -np 4 nvprof-script a.out 
    #   mpirun -np 4 nvprof-script -o outfile a.out
    #   mpirun -np 4 nvprof-script test/a.out -g -j
    # In the case you want to pass a -o or -h flag to the a.out, you
    # can do this.
    #   mpirun -np 4 nvprof-script -c a.out -h -o
    # You can also pass in arguments to nvprof
    #   mpirun -np 4 nvprof-script --print-api-trace a.out
    #
    
    usage () {
     echo "nvprof-script [nvprof options] [-h] [-o outfile] a.out [a.out options]";
     echo "or"
     echo "nvprof-script [nvprof options] [-h] [-o outfile] -c a.out [a.out options]";
    }
    
    nvprof_args=""
    while [ $# -gt 0 ];
    do
        case "$1" in
            (-o) shift; outfile="$1";;
            (-c) shift; break;;
            (-h) usage; exit 1;;
            (*) nvprof_args="$nvprof_args $1";;
        esac
        shift
    done
    
    # If user did not provide output filename then create one
    if [ -z $outfile ] ; then
        outfile=`basename $1`.nvprof-out
    fi
    
    # Find the rank of the process from the MPI rank environment variable
    # to ensure unique output filenames.  The script handles Open MPI
    # and MVAPICH.  If your implementation is different, you will need to
    # make a change here.
    
    # Open MPI
    if [ ! -z ${OMPI_COMM_WORLD_RANK} ] ; then
        rank=${OMPI_COMM_WORLD_RANK}
    fi
    # MVAPICH
    if [ ! -z ${MV2_COMM_WORLD_RANK} ] ; then
        rank=${MV2_COMM_WORLD_RANK}
    fi
    
    # Set the nvprof command and arguments.
    NVPROF="nvprof --output-profile $outfile.$rank $nvprof_args" 
    exec $NVPROF $*
    
    # If you want to limit which ranks get profiled, do something like
    # this. You have to use the -c switch to get the right behavior.
    # mpirun -np 2 nvprof-script --print-api-trace -c a.out -q  
    # if [ $rank -le 0 ]; then
    #     exec $NVPROF $*
    # else
    #     exec $*
    # fi
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've had a look around to see if this has been answered, and there
I recently had to take a quick look at Adobe InDesign server. In this
Quick question that I haven't really had a chance to look into. Which is
I've had a quick look through telerik's documentation and a search on here hasn't
I had a quick question. Is it possible to save a file without actually
I had a quick question about Django URL configuration, and I guess REGEX as
I just had a quick question about git - how backwards compatible are git
I am new to D3 and just had a quick question about tick labels
Having had a quick look at the Flex docs I can't seem to find
I had a quick question regarding the datacontractserializer. Maybe it's more of a stream

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.