Requirement: Extrae tool installed in the machine

Under $EXTRAE_HOME/share/examples you will find examples/templates to instrument your application. To use one of the examples, please copy the corresponding directory on your home or scratch directory.

In many cases you can use your production binary and just modify the job script. The Extrae hands-on slides describe in detail the modifications required. The three main checks you have to consider are:

  1. To add the trace.sh script in the execution line (just before the binary name). Examples of the trace.sh are provided with the distribution and also included in the slides. If your application has MPI the command line would be similar to: mpirun -np 27 ./trace.sh ./lulesh2.0 –i 10 -s 65 if your code does not have MPI, you can still use the same approach ./trace.sh omp_hello
  2. To verify that trace.sh is preloading the right instrumentation library based on your application programming model and language. The slides include a table with the most relevant combinations, but for instance:
    1. For MPI C/C++ codes: export LD_PRELOAD=${EXTRAE_HOME}/lib/libmpitrace.so
    2. For MPI Fortran codes: export LD_PRELOAD=${EXTRAE_HOME}/lib/libmpitracef.so
    3. For MPI+OpenMP C/C++ codes: export LD_PRELOAD=${EXTRAE_HOME}/lib/libompitrace.so
  3. To verify that the extrae.xml pointed in trace.sh is set to intercept the desired runtimes. You can find with the examples of the distribution some extrae.xml set for different programming model combinations.

 Remember that extrae has to be built with the same MPI installation you use on your code, and that the supported OpenMP runtimes are GNU and Intel.

The Extrae manual contains a complete description of the tracing package.