-
Notifications
You must be signed in to change notification settings - Fork 60
Downloading and Installing PAPI
Frank Winkler edited this page Apr 9, 2020
·
14 revisions
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.
-
Remove any current papi files and installation
#!bash git clone https://bitbucket.org/icl/papi.git cd papi/src ./configure --prefix=$PWD/install make && make install
-
Run "papi_component_avail"
#!bash cd install/bin ./papi_component_avail
-
If 2. works, run some tests under papi/src/ctests, for example:
#!bash cd papi/src/ctests ./serial_hl
-
Before running PAPI with your own code, do the following:
#!bash export PATH=<you location where PAPI is installed>/papi/src/install:$PATH export LD_LIBRARY_PATH=<you location where PAPI is installed>/papi/src/install/lib:$LD_LIBRARY_PATH
-
Instrument your code with PAPI, see PAPI Counter Interfaces.
-
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 export PAPI_DIR=<you location where PAPI is installed> gcc hello_world.c -I/${PAPI_DIR}/include -L/${PAPI_DIR}/lib -o hello_world -lpapi ./hello_world