6. Use of PAPI¶
Here describes about the use of PAPI.
6.1. Overview¶
This section shows how to compile and link the program and notes, using PAPI(Performance Application Programming Interface), on Supercomputer Fugaku.
Please refer to https://icl.utk.edu/papi/ for more information about PAPI.
6.2. Compiling link¶
Indicates options that must be specified when compiling and linking.
Options required during compilation
Language
Option
Fortran
-I/opt/FJSVxos/devkit/aarch64/rfs/usr/include
C/C++
-
Options required during linking
Language
Compiler mode
Option
Fortran
-
-Nnofjprof -lpapi
C/C++
trad mode
-Nnofjprof -lpapi
C/C++
clang mode
-ffj-no-fjprof -lpapi
Attention
When creating the executable file (a.out), specify
-Nnofjprof
option (If clang mode,-ffj-no-fjprof
) and do not link the Fujitsu tool library.
The following are examples of compilation in each language.
Forttran compiling example
[_LNlogin]$ frtpx -o papi_sample_f -Kfast,parallel,optmsg=2 -I/opt/FJSVxos/devkit/aarch64/rfs/usr/include -Nlst=t -Nnofjprof -lpapi papi_sample.f95
C compiling example (trad mode)
[_LNlogin]$ fccpx -o papi_sample_c -Kfast,parallel,optmsg=2 -Nlst=t -Nnofjprof -lpapi papi_sample_c.c
C++ compiling example (clang mode)
[_LNlogin]$ FCCpx -o papi_sample_cc -Nclang -Ofast -mllvm -polly -mllvm -polly-parallel -Rpass=.* -ffj-lst=t -ffj-no-fjprof -lpapi papi_sample_cc.cc
6.3. How to execute¶
This indicates the program execution example of using PAPI.
[Execution example]
#!/bin/bash -x
#
#PJM -L "node=12"
#PJM -L "elapse=00:10:00"
#PJM --mpi "proc=16"
#PJM -x PJM_LLIO_GFSCACHE=/vol000N
#PJM -g groupname
#PJM -s
#
export OMP_NUM_THREADS=12
xospastop #Required
mpiexec ./papi.out
Attention
For the program used PAPI, please proceed once executed xospastop command. if not proceeded xospastop command, an error may occur during PAPI processing.
Also the job proceeded xospastop command, stops collection of PMU counter (Performance Monitoring Unit Counter). There is no option or message output, and the exit status is always 0.
6.4. Notes¶
Please note the following points about programs using PAPI.
PAPI is not supported
If you do not run xospastop, you will not get the correct results.