Wiki
Clone wikipapi / Downloading-and-Installing-PAPI
Downloading and Installing PAPI
Clone the PAPI repository the first time with the following command:
#!bash
git clone https://bitbucket.org/icl/papi.git
This creates a complete copy of the papi git repository in a folder called 'papi'.
To make sure your copy is up to date with the repository:
#!bash cd papi git pull https://bitbucket.org/icl/papi.git
To install PAPI on your system:
- Find the section in INSTALL.txt that pertains to your hardware and operating system.
- Follow the directions to install required components and build the PAPI libraries.
- Run the test suite when you are finished to verify that everything went ok. NOTE: Although we make every attempt to get all tests to PASS or SKIP on all platforms, there are occasional instances of FAILures due to excessively tight compliance thresholds or platform idiosyncrasies. Don't panic if one or two tests FAIL. Contact us with complete output and we'll see what we can do.
Example:
1) Install PAPI
#!bash cd papi/src ./configure --prefix=$PWD/install make && make install
2) Run 'papi_avail'
#!bash cd install/bin ./papi_avail
3) If 2. works, run some tests under papi/src/ctests, for example:
#!bash cd papi/src/ctests ./serial_hl
4) Before running PAPI with your own code, do the following:
#!bash export PAPI_DIR=<you location where PAPI is installed> export PATH=${PAPI_DIR}/bin:$PATH export LD_LIBRARY_PATH=${PAPI_DIR}/lib:$LD_LIBRARY_PATH
5) Instrument your code with PAPI, see PAPI Counter Interfaces.
6) Compile and run your own code. Don't forget to give it the correct path to the PAPI header and PAPI lib in your Makefile.
Example:
#!bash gcc hello_world.c -I/${PAPI_DIR}/include -L/${PAPI_DIR}/lib -o hello_world -lpapi ./hello_world
Updated