HPCTW is a set of libraries that may be linked to in order to gather MPI usage and hardware performance counter information for IBM BG/Q. There are three libraries to choose from depending on that statistics you want to gather.
Load the HPCTW module
module load hpctw
This module sets three environment variables that can then be used in the final link line of your programs compilation depending on that statistics you want to gather.
For MPI only
For MPI with hardware counters use
For MPI/OpenMP with hardware counters use
Now run the program in the normal way and a series of text file outputs will be generated in the working directory. For analysis and other options see the HPCTW Document below provided by the author.