OpenCMISS-Iron Internal API Documentation
Setup

Compile PAPI

The first step in setting up TAU with OpenCMISS is to compile PAPI. First, checkout the PAPI directory from the OpenCMISS Extras repository. If you havent already checked it out, run this command from your OpenCMISS Extras directory ($OPENCMISSEXTRAS_ROOT) in a terminal.

svn co https://svn.physiomeproject.org/svn/opencmissextras/cm/trunk/external/packages/PAPI cm/external/packages/PAPI

Then change to the PAPI directory and envoke a make command.

cd $OPENCMISSEXTRAS_ROOT/cm/external/packages/PAPI
make COMPILER=gnu

This process could take several minutes and will compile PAPI into the appropriate directories in your OpenCMISS Extras directory (most likely cm/external/x86_64-linux-debug/mpich2/gnu/). Note, PAPI needs to be compiled before compiling TAU. If any errors occur, check make.out and install.out in PAPI/papi-3.7.2/src for more information.

Compile TAU

If you want to compile TAU without PAPI, you will need to remove the -papi=$(EXTERNAL_DIR) flag from TAU_CONFIG_OPTIONS in $OPENCMISSEXTRAS_ROOT/cm/external/packages/TAU/Makefile.

Compiling TAU is very similar to compiling PAPI. First, checkout the TAU directory from the OpenCMISS Extras repository. If you havent already checked it out, run this command from your OpenCMISS Extras directory ($OPENCMISSEXTRAS_ROOT) in a terminal.

svn co https://svn.physiomeproject.org/svn/opencmissextras/cm/trunk/external/packages/TAU cm/external/packages/TAU

Then change to the PAPI directory and envoke a make command.

cd $OPENCMISSEXTRAS_ROOT/cm/external/packages/TAU
make COMPILER=gnu

This process is very long and could take up to 30 minutes. Again, TAU will be built into the appropriate directories as done with PAPI. If any errors occur, check make.out and install.out in TAU/tau-2.19 for more information.

There are a few important files created during this process. If you have added the correct OpenCMISS Extras bin directory to your PATH, two new executables of note will now be available to you, papi_avail and paraprof. Running papi_avail will display the PAPI metrics (hardware level events like cache misses or branch mispredicts) available to you on your machine. paraprof is a profiling visualisation tool which is needed to visualise data outputted by TAU. Running both of these programs is recommended at this point just to provide confirmation that both PAPI and TAU have compiled properly.

TAU will also create library files with filenames which depend on the options used when compiling TAU. The TAU Makefile provided in the OpenCMISS Extras repository sets these options for you and this should result in a main TAU library file called libtau-phase-papi-mpi.a.

It is important to note that if you change any of the configure options in the provided TAU Makefile (i.e build TAU without PAPI) you will need to alter the ExampleMakefile, otherwise the linker will not be able to find the TAU library file. The following line of NewExampleMakefile will need to be updated with the TAU library filename on your system.

TAU_LIBRARIES += -ltau-phase-papi-mpi -l:libpapi.a -l:libpfm.a