cprofilinghpcintel-advisor

How to use Intel Advisor to profile my parallel MPI application?


I am working on a remote Linux server where I have my application running in parallel with MPI. I want to profile it and test how good is the load balance in each MPI process and which are the heaviest parts of the code.

To run my application in parallel I usually run it like this:

mpirun -n # ${location}/myApp arg1 arg2 etc.

In the machine there is a module about Intel Advisor which I am going to use. The GUI command advixe-gui does not work so I have to do it with advixe-cl

In case is helpful, when I type: advixe-cl it returns me this:

Intel(R) Advisor Command Line Tool Copyright (C) 2009-2019 Intel Corporation. All rights reserved. Usage: advixe-cl <--action> [--action-option] [--global-option] [[--] <target> [target options]] Use --help for details.

Any idea about how to proceed further with profiling?


Solution

  • You have to use Advisor's command line (advixe-cl) and you have to "wrap" your advixe-cl command line by mpirun. And you can copy and view obtained profiles with GUI afterwards - with individual "result view" for each rank profiled.

    You can "wrap" the command line in few ways, for example (Intel MPI specific):

    $ mpirun -n 1 -gtool "advixe-cl -collect survey -no-auto-finalize -project-dir /user/test/vec_project:0" /user/test/vec_samples/vec_samples
    

    or (generic MPI with SLURM):

    $ srun –n 1 –c 32 advixe-cl --collect=survey --project-dir=./adv -- ./miniFE.x
    

    This topic is described in many details (including selective rank analysis or e.g Cray or Intel MPI specifics) in following Intel "Cookbooks" and articles:

    1. Intel MPI-specific : Analyzing Intel MPI applications with Intel Advisor
    2. Generic MPI, SLURM, for famous WRF workfload: Analyze Vectorization and Memory Aspects of an MPI Application "cookbook"
    3. Advisor for MPI apps on Cray system: Analyze Performance on Cray Systems "cookbook"
    4. Advisor Documentation chapter
    5. Yet another article