From 5c5d2c3e4c3b668d928214bfabde44b01a7bd4ed Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 17 2022 08:50:30 +0000 Subject: import papi-6.0.0-11.el9 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..866657f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/papi-6.0.0-noiozone.tar.gz diff --git a/.papi.metadata b/.papi.metadata new file mode 100644 index 0000000..090cd0f --- /dev/null +++ b/.papi.metadata @@ -0,0 +1 @@ +96415af51f021dcbb71c04ac236037941cf5babc SOURCES/papi-6.0.0-noiozone.tar.gz diff --git a/SOURCES/papi-a64fx.patch b/SOURCES/papi-a64fx.patch new file mode 100644 index 0000000..f4d1132 --- /dev/null +++ b/SOURCES/papi-a64fx.patch @@ -0,0 +1,34 @@ +commit 9a44d82928ed17ba2ff21eb88b89c5829d0ea30e +Author: Steve Kaufmann +Date: Wed Jun 24 14:08:08 2020 -0400 + + Added PAPI preset support for Fujitsu A64FX. + + Signed-off-by: Heike Jagode + +diff --git a/src/papi_events.csv b/src/papi_events.csv +index 8e96adfbd..1b5c15542 100644 +--- a/src/papi_events.csv ++++ b/src/papi_events.csv +@@ -1877,6 +1877,21 @@ PRESET,PAPI_L2_DCR,NOT_DERIVED,L2D_CACHE_RD + PRESET,PAPI_L2_DCW,NOT_DERIVED,L2D_CACHE_WR + PRESET,PAPI_L2_LDM,NOT_DERIVED,L2D_CACHE_REFILL_RD + ++######################### ++# ARM Fujitsu A64FX # ++######################### ++CPU,arm_a64fx ++# ++PRESET,PAPI_TOT_INS,NOT_DERIVED,INST_RETIRED ++PRESET,PAPI_TOT_CYC,NOT_DERIVED,CPU_CYCLES ++PRESET,PAPI_FP_INS,NOT_DERIVED,VFP_SPEC ++PRESET,PAPI_VEC_INS,NOT_DERIVED,ASE_SPEC ++PRESET,PAPI_L1_DCM,NOT_DERIVED,L1D_CACHE_REFILL ++PRESET,PAPI_L1_ICA,NOT_DERIVED,L1I_CACHE ++PRESET,PAPI_L1_ICM,NOT_DERIVED,L1I_CACHE_REFILL ++PRESET,PAPI_L2_DCH,NOT_DERIVED,L2D_CACHE ++PRESET,PAPI_L2_DCM,NOT_DERIVED,L2D_CACHE_REFILL ++ + # + CPU,mips_74k + # diff --git a/SOURCES/papi-config.patch b/SOURCES/papi-config.patch new file mode 100644 index 0000000..9b34cf5 --- /dev/null +++ b/SOURCES/papi-config.patch @@ -0,0 +1,348 @@ +commit 38290c41abbb105ca198411ec3c466ac027f5b8f +Author: Frank Winkler +Date: Fri Apr 24 16:18:22 2020 +0200 + + Fixed configure options for shared and static builds. + + 1) --with-static-lib=no (force PAPI to build shared libraries and tools) + 2) --with-shlib-tools (use internal libpfm via rpath-link) + +diff --git a/src/configure.in b/src/configure.in +index 3cf47edc1..1f58f7c8e 100644 +--- a/src/configure.in ++++ b/src/configure.in +@@ -200,9 +200,13 @@ else + AC_MSG_ERROR([cannot find dlopen and dlerror symbols neither in the base system libraries nor in -ldl]) + fi + fi ++ ++# Disable LDL for static builds ++# if test "x${STATIC}" = "x"; then ++# LDL="" ++# fi + AC_SUBST(LDL) +- +- ++ + if test "$OS" = "CLE"; then + virtualtimer=times + tls=__thread +@@ -827,10 +831,6 @@ AC_ARG_WITH(static_tools, + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) + +-if test "$static_lib" = "no"; then +- AC_MSG_ERROR(Building tests and utilities static but no static papi library to be built) +-fi +- + AC_MSG_CHECKING(for linking with papi shared library of tests and utilities) + AC_ARG_WITH(shlib_tools, + [ --with-shlib-tools Specify linking with papi library of tests and utilities], +@@ -839,6 +839,14 @@ AC_ARG_WITH(shlib_tools, + [shlib_tools=no + AC_MSG_RESULT(no)]) + ++if test "$static_lib" = "no"; then ++ shlib_tools=yes ++fi ++ ++if test "$static_lib" = "no" -a "$shlib_tools" = "no"; then ++ AC_MSG_ERROR(Building tests and utilities static but no static papi library to be built) ++fi ++ + if test "$shlib_tools" = "yes"; then + if test "$shared_lib" != "yes"; then + AC_MSG_ERROR(Building static but specified shared linking for tests and utilities) +@@ -847,6 +855,8 @@ if test "$shlib_tools" = "yes"; then + AC_MSG_ERROR([Building shared but specified static linking]) + fi + LINKLIB='$(SHLIB)' ++ #WORKAROUND: if libpfm cannot be found at link time ++ LDFLAGS="$LDFLAGS -Wl,-rpath-link,$PWD/libpfm4/lib" + elif test "$shlib_tools" = "no"; then + if test "$static_lib" != "yes"; then + AC_MSG_ERROR([Building shared but specified static linking for tests and utilities]) +commit d6f4e34d083f18cfdba38dd5e4bbfb2a580b8a9e +Author: Frank Winkler +Date: Fri Apr 24 16:38:18 2020 +0200 + + Another test for "--with-static-tools". + +diff --git a/src/configure.in b/src/configure.in +index 1f58f7c8e..e8d769578 100644 +--- a/src/configure.in ++++ b/src/configure.in +@@ -201,10 +201,6 @@ else + fi + fi + +-# Disable LDL for static builds +-# if test "x${STATIC}" = "x"; then +-# LDL="" +-# fi + AC_SUBST(LDL) + + if test "$OS" = "CLE"; then +@@ -831,6 +827,11 @@ AC_ARG_WITH(static_tools, + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) + ++# Disable LDL for static builds ++# if test "$STATIC" = "-static"; then ++# LDL="" ++# fi ++ + AC_MSG_CHECKING(for linking with papi shared library of tests and utilities) + AC_ARG_WITH(shlib_tools, + [ --with-shlib-tools Specify linking with papi library of tests and utilities], +commit 1c333c9954b872cda1b4d873fa81b14ec58a58a7 +Author: Frank Winkler +Date: Thu Apr 30 18:51:34 2020 +0200 + + Fixed static build. + - SDE component is disabled + - "ctest" shlib is disabled + +diff --git a/src/configure.in b/src/configure.in +index e8d769578..0eee98ea1 100644 +--- a/src/configure.in ++++ b/src/configure.in +@@ -827,10 +827,11 @@ AC_ARG_WITH(static_tools, + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) + +-# Disable LDL for static builds +-# if test "$STATIC" = "-static"; then +-# LDL="" +-# fi ++# Disable LDL AND SDE for static builds ++if test "$STATIC" = "-static"; then ++ LDL="" ++ SDE_ENABLED= ++fi + + AC_MSG_CHECKING(for linking with papi shared library of tests and utilities) + AC_ARG_WITH(shlib_tools, +@@ -1768,6 +1769,7 @@ for comp in $components; do + if test "x$comp" = "xsde" ; then + LDFLAGS="$LDFLAGS $LRT" + LIBS="$LIBS $LRT" ++ SDE_ENABLED=1 + fi + done + +@@ -1862,6 +1864,7 @@ AC_SUBST(BGP_SYSDIR) + AC_SUBST(BITFLAGS) + AC_SUBST(COMPONENT_RULES) + AC_SUBST(COMPONENTS) ++AC_SUBST(SDE_ENABLED) + AC_SUBST(FTEST_TARGETS) + AC_SUBST(HAVE_NO_OVERRIDE_INIT) + AC_SUBST(BGPM_INSTALL_DIR) +diff --git a/src/ctests/Makefile.recipies b/src/ctests/Makefile.recipies +index b7c1963d7..44e19b398 100644 +--- a/src/ctests/Makefile.recipies ++++ b/src/ctests/Makefile.recipies +@@ -11,7 +11,11 @@ MPX = max_multiplex multiplex1 multiplex2 mendes-alt sdsc-mpx sdsc2-mpx \ + MPXPTHR = multiplex1_pthreads multiplex3_pthreads kufrin + MPI = mpi_hl mpi_omp_hl \ + mpifirst ++ ++ifeq ($(STATIC),) + SHARED = shlib ++endif ++ + SERIAL = serial_hl serial_hl_ll_comb\ + all_events all_native_events branches calibrate case1 case2 \ + cmpinfo code2name derived describe destroy disable_component \ +@@ -344,8 +348,10 @@ case2: case2.c $(TESTLIB) $(PAPILIB) + low-level: low-level.c $(TESTLIB) $(DOLOOPS) $(PAPILIB) + $(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) low-level.c $(TESTLIB) $(DOLOOPS) $(PAPILIB) $(LDFLAGS) -o low-level + ++ifeq ($(STATIC),) + shlib: shlib.c $(TESTLIB) $(PAPILIB) + $(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) shlib.c $(TESTLIB) $(PAPILIB) $(LDFLAGS) -o shlib $(LDL) ++endif + + exeinfo: exeinfo.c $(TESTLIB) $(PAPILIB) + -$(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) exeinfo.c $(TESTLIB) $(PAPILIB) $(LDFLAGS) -o exeinfo +diff --git a/src/ctests/Makefile.target.in b/src/ctests/Makefile.target.in +index edc04f1b7..af64e157c 100644 +--- a/src/ctests/Makefile.target.in ++++ b/src/ctests/Makefile.target.in +@@ -10,6 +10,7 @@ INCLUDE = -I. -I@includedir@ -I$(testlibdir) -I$(validationlibdir) + LIBDIR = @libdir@ + LIBRARY = @LIBRARY@ + SHLIB = @SHLIB@ ++STATIC = @STATIC@ + PAPILIB = ../@LINKLIB@ + TESTLIB = $(testlibdir)/libtestlib.a + LDFLAGS = @LDFLAGS@ @LDL@ @STATIC@ +diff --git a/src/utils/Makefile b/src/utils/Makefile +index 4abfd6cb8..64a2b8f9f 100644 +--- a/src/utils/Makefile ++++ b/src/utils/Makefile +@@ -48,8 +48,13 @@ papi_mem_info: papi_mem_info.o $(PAPILIB) + papi_multiplex_cost: papi_multiplex_cost.o $(PAPILIB) cost_utils.o + $(CC) -o papi_multiplex_cost papi_multiplex_cost.o cost_utils.o $(PAPILIB) -lm $(LDFLAGS) + ++ifneq ($(SDE_ENABLED),) + papi_native_avail: papi_native_avail.o $(PAPILIB) print_header.o papi_sde_interface.o + $(CC) -o papi_native_avail papi_native_avail.o $(PAPILIB) print_header.o $(LDFLAGS) papi_sde_interface.o ++else ++papi_native_avail: papi_native_avail.o $(PAPILIB) print_header.o ++ $(CC) -o papi_native_avail papi_native_avail.o $(PAPILIB) print_header.o $(LDFLAGS) ++endif + + papi_version: papi_version.o $(PAPILIB) + $(CC) -o papi_version papi_version.o $(PAPILIB) $(LDFLAGS) +@@ -65,8 +70,10 @@ cost_utils.o: ../testlib/papi_test.h cost_utils.c + print_header.o: print_header.h print_header.c + $(CC) $(INCLUDE) $(CFLAGS) $(OPTFLAGS) -c print_header.c + ++ifneq ($(SDE_ENABLED),) + papi_sde_interface.o: papi_sde_interface.c + $(CC) $(INCLUDE) $(CFLAGS) $(OPTFLAGS) -c papi_sde_interface.c ++endif + + clean: + rm -f *.o *.stderr *.stdout core *~ $(ALL) +diff --git a/src/utils/Makefile.target.in b/src/utils/Makefile.target.in +index bcdbe94e9..9c76b37af 100644 +--- a/src/utils/Makefile.target.in ++++ b/src/utils/Makefile.target.in +@@ -9,6 +9,7 @@ INCLUDE = -I. -I@includedir@ -I$(testlibdir) + LIBDIR = @libdir@ + LIBRARY = @LIBRARY@ + SHLIB = @SHLIB@ ++SDE_ENABLED = @SDE_ENABLED@ + PAPILIB = ../@LINKLIB@ + TESTLIB = $(testlibdir)/libtestlib.a + LDFLAGS = @LDFLAGS@ @LDL@ @STATIC@ +diff --git a/src/utils/papi_native_avail.c b/src/utils/papi_native_avail.c +index ae6dbb9e5..902ed7996 100644 +--- a/src/utils/papi_native_avail.c ++++ b/src/utils/papi_native_avail.c +@@ -51,8 +51,9 @@ + + #include "papi.h" + #include "print_header.h" ++#ifdef SDE_ENABLED + #include "components/sde/interface/papi_sde_interface.h" +- ++#endif + #define EVT_LINE 80 + #define EVT_LINE_BUF_SIZE 4096 + +@@ -84,7 +85,9 @@ print_help( char **argv ) + printf( "\nGeneral command options:\n" ); + printf( "\t-h, --help print this help message\n" ); + printf( "\t-c, --check attempts to add each event\n"); ++#ifdef SDE_ENABLED + printf( "\t-sde FILE lists SDEs that are registered by the library or executable in FILE\n" ); ++#endif + printf( "\t-e EVENTNAME display detailed information about named native event\n" ); + printf( "\t-i EVENTSTR include only event names that contain EVENTSTR\n" ); + printf( "\t-x EVENTSTR exclude any event names that contain EVENTSTR\n" ); +@@ -368,6 +371,7 @@ parse_event_qualifiers( PAPI_event_info_t * info ) + return ( 1 ); + } + ++#ifdef SDE_ENABLED + void + invoke_hook_fptr( char *lib_path ) + { +@@ -394,6 +398,7 @@ invoke_hook_fptr( char *lib_path ) + dlclose(dl_handle); + return; + } ++#endif + + int + main( int argc, char **argv ) +@@ -444,6 +449,7 @@ main( int argc, char **argv ) + return 2; + } + ++#ifdef SDE_ENABLED + /* + The following code will execute if the user wants to list the SDEs in the + library (or executable) stored in flags.path. This code will not list the +@@ -514,6 +520,7 @@ skip_lib: + if( NULL != cmd ) free(cmd); + } + no_sdes: ++#endif //SDE_ENABLED + + /* Do this code if the event name option was specified on the commandline */ + if ( flags.named ) { +commit b5111efaf1b234541c94b8ef7e5791bf8eb094b3 +Author: Frank Winkler +Date: Thu May 7 09:00:53 2020 +0200 + + Added CFLAG -DSDE. + +diff --git a/src/configure.in b/src/configure.in +index 0eee98ea1..781148e5b 100644 +--- a/src/configure.in ++++ b/src/configure.in +@@ -1767,6 +1767,7 @@ tests="$tests comp_tests" + # check for SDE component to determine if we need -lrt in LDFLAGS + for comp in $components; do + if test "x$comp" = "xsde" ; then ++ CFLAGS="$CFLAGS -DSDE" + LDFLAGS="$LDFLAGS $LRT" + LIBS="$LIBS $LRT" + SDE_ENABLED=1 +diff --git a/src/utils/papi_native_avail.c b/src/utils/papi_native_avail.c +index 902ed7996..7d90c4064 100644 +--- a/src/utils/papi_native_avail.c ++++ b/src/utils/papi_native_avail.c +@@ -51,9 +51,10 @@ + + #include "papi.h" + #include "print_header.h" +-#ifdef SDE_ENABLED ++#if SDE + #include "components/sde/interface/papi_sde_interface.h" + #endif ++ + #define EVT_LINE 80 + #define EVT_LINE_BUF_SIZE 4096 + +@@ -85,7 +86,7 @@ print_help( char **argv ) + printf( "\nGeneral command options:\n" ); + printf( "\t-h, --help print this help message\n" ); + printf( "\t-c, --check attempts to add each event\n"); +-#ifdef SDE_ENABLED ++#if SDE + printf( "\t-sde FILE lists SDEs that are registered by the library or executable in FILE\n" ); + #endif + printf( "\t-e EVENTNAME display detailed information about named native event\n" ); +@@ -371,7 +372,7 @@ parse_event_qualifiers( PAPI_event_info_t * info ) + return ( 1 ); + } + +-#ifdef SDE_ENABLED ++#if SDE + void + invoke_hook_fptr( char *lib_path ) + { +@@ -449,7 +450,7 @@ main( int argc, char **argv ) + return 2; + } + +-#ifdef SDE_ENABLED ++#if SDE + /* + The following code will execute if the user wants to list the SDEs in the + library (or executable) stored in flags.path. This code will not list the +@@ -520,7 +521,7 @@ skip_lib: + if( NULL != cmd ) free(cmd); + } + no_sdes: +-#endif //SDE_ENABLED ++#endif //SDE + + /* Do this code if the event name option was specified on the commandline */ + if ( flags.named ) { diff --git a/SOURCES/papi-lto.patch b/SOURCES/papi-lto.patch new file mode 100644 index 0000000..17bd7cf --- /dev/null +++ b/SOURCES/papi-lto.patch @@ -0,0 +1,124 @@ +commit cbca67dae5722d65590e33b8b885a561ac3fff5d +Author: William Cohen +Date: Tue Jun 15 21:48:15 2021 -0400 + + Use numeric local labels to allow compilation with LTO enabled + + Some assembly snippets in instructions_testcode.c used regular label + names. Unfortunately, when multiple copies of the snippets are + inlined in different places with LTO enabled the multiple copies of a + label by the same name cause the build to fail because of the + redefinition of the label. To avoid this problem all those labels + have been converted to numeric local labels to allow multiple copies + to peacefully coexist in the LTO enabled code. + +diff --git a/src/validation_tests/instructions_testcode.c b/src/validation_tests/instructions_testcode.c +index 3634b1f90..128127c25 100644 +--- a/src/validation_tests/instructions_testcode.c ++++ b/src/validation_tests/instructions_testcode.c +@@ -10,9 +10,9 @@ int instructions_million(void) { + #if defined(__i386__) || (defined __x86_64__) + asm( " xor %%ecx,%%ecx\n" + " mov $499999,%%ecx\n" +- "test_loop:\n" ++ "55:\n" + " dec %%ecx\n" +- " jnz test_loop\n" ++ " jnz 55b\n" + : /* no output registers */ + : /* no inputs */ + : "cc", "%ecx" /* clobbered */ +@@ -47,9 +47,9 @@ int instructions_million(void) { + #elif defined(__sparc__) + asm( " sethi %%hi(333333), %%l0\n" + " or %%l0,%%lo(333333),%%l0\n" +- "test_loop:\n" ++ "55:\n" + " deccc %%l0 ! decrement count\n" +- " bnz test_loop ! repeat until zero\n" ++ " bnz 55b ! repeat until zero\n" + " nop ! branch delay slot\n" + : /* no output registers */ + : /* no inputs */ +@@ -57,13 +57,13 @@ int instructions_million(void) { + ); + return 0; + #elif defined(__arm__) +- asm( " ldr r2,count @ set count\n" +- " b test_loop\n" +- "count: .word 333332\n" +- "test_loop:\n" ++ asm( " ldr r2,42f @ set count\n" ++ " b 55f\n" ++ "42: .word 333332\n" ++ "55:\n" + " add r2,r2,#-1\n" + " cmp r2,#0\n" +- " bne test_loop @ repeat till zero\n" ++ " bne 55b @ repeat till zero\n" + : /* no output registers */ + : /* no inputs */ + : "cc", "r2" /* clobbered */ +@@ -71,10 +71,10 @@ int instructions_million(void) { + return 0; + #elif defined(__aarch64__) + asm( " ldr x2,=333332 // set count\n" +- "test_loop:\n" ++ "55:\n" + " add x2,x2,#-1\n" + " cmp x2,#0\n" +- " bne test_loop // repeat till zero\n" ++ " bne 55b // repeat till zero\n" + : /* no output registers */ + : /* no inputs */ + : "cc", "r2" /* clobbered */ +@@ -97,7 +97,7 @@ int instructions_fldcw(void) { + double three=3.0; + + asm( " mov $100000,%%ecx\n" +- "big_loop:\n" ++ "44:\n" + " fldl %1 # load value onto fp stack\n" + " fnstcw %0 # store control word to mem\n" + " movzwl %0, %%eax # load cw from mem, zero extending\n" +@@ -106,7 +106,7 @@ int instructions_fldcw(void) { + " fldcw %3 # save new rounding mode\n" + " fistpl %2 # save stack value as integer to mem\n" + " fldcw %0 # restore old cw\n" +- " loop big_loop # loop to make the count more obvious\n" ++ " loop 44b # loop to make the count more obvious\n" + : /* no output registers */ + : "m"(saved_cw), "m"(three), "m"(result), "m"(cw) /* inputs */ + : "cc", "%ecx","%eax" /* clobbered */ +@@ -129,13 +129,13 @@ int instructions_rep(void) { + + asm( " mov $1000,%%edx\n" + " cld\n" +- "loadstore: # test 8-bit store\n" ++ "66: # test 8-bit store\n" + " mov $0xd, %%al # set eax to d\n" + " mov $16384, %%ecx\n" + " mov %0, %%edi # set destination\n" + " rep stosb # store d 16384 times, auto-increment\n" + " dec %%edx\n" +- " jnz loadstore\n" ++ " jnz 66b\n" + : /* outputs */ + : "rm" (buffer_out) /* inputs */ + : "cc", "%esi","%edi","%edx","%ecx","%eax","memory" /* clobbered */ +@@ -147,13 +147,13 @@ int instructions_rep(void) { + + asm( " mov $1000,%%edx\n" + " cld\n" +- "loadstore: # test 8-bit store\n" ++ "66: # test 8-bit store\n" + " mov $0xd, %%al # set eax to d\n" + " mov $16384, %%ecx\n" + " mov %0, %%rdi # set destination\n" + " rep stosb # store d 16384 times, auto-increment\n" + " dec %%edx\n" +- " jnz loadstore\n" ++ " jnz 66b\n" + : /* outputs */ + : "rm" (buffer_out) /* inputs */ + : "cc", "%esi","%edi","%edx","%ecx","%eax","memory" /* clobbered */ diff --git a/SOURCES/papi-nostatic.patch b/SOURCES/papi-nostatic.patch new file mode 100644 index 0000000..435aa5e --- /dev/null +++ b/SOURCES/papi-nostatic.patch @@ -0,0 +1,30 @@ +commit cc34c978778adb40df1a200059a31c8d628b10ee +Author: William Cohen +Date: Thu Jan 21 14:48:01 2021 -0500 + + Only check for libpfm.a if static libraries are being used. + + Even when static libraries are not be used papi was checking for + libpfm.a, this would cause a failure if libpfm.a wasn't installed. + Exclude checking for libpfm.a if no static libpfm library is needed. + +diff --git a/src/Rules.pfm4_pe b/src/Rules.pfm4_pe +index 61eedc8a3..65a9635c6 100644 +--- a/src/Rules.pfm4_pe ++++ b/src/Rules.pfm4_pe +@@ -32,6 +32,7 @@ ifeq (yes,$(MIC)) + FORCE_PFM_ARCH="CONFIG_PFMLIB_ARCH_X86=y" + endif + ++ifneq (,$(STATIC)) + ifeq (,$(PFM_OBJS)) + $(PFM_LIB_PATH)/libpfm.a: + ifneq (,${PFM_ROOT}) +@@ -49,6 +50,7 @@ else + endif + $(MAKE) + endif ++endif + + include Makefile.inc + diff --git a/SOURCES/papi-python3.patch b/SOURCES/papi-python3.patch new file mode 100644 index 0000000..c5e7509 --- /dev/null +++ b/SOURCES/papi-python3.patch @@ -0,0 +1,10 @@ +diff --git a/src/high-level/scripts/papi_hl_output_writer.py b/src/high-level/scripts/papi_hl_output_writer.py +index 123d2cd0..34bfbd73 100755 +--- a/src/high-level/scripts/papi_hl_output_writer.py ++++ b/src/high-level/scripts/papi_hl_output_writer.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + from __future__ import division + from collections import OrderedDict + diff --git a/SPECS/papi.spec b/SPECS/papi.spec new file mode 100644 index 0000000..01e037c --- /dev/null +++ b/SPECS/papi.spec @@ -0,0 +1,478 @@ +# Default to no static libraries +%{!?with_static: %global with_static 0} +%bcond_with bundled_libpfm +# rdma is not available +%ifarch %{arm} +%{!?with_rdma: %global with_rdma 0} +%else +%{!?with_rdma: %global with_rdma 1} +%endif +%{!?with_pcp: %global with_pcp 1} +Summary: Performance Application Programming Interface +Name: papi +Version: 6.0.0 +Release: 11%{?dist} +License: BSD +Requires: papi-libs = %{version}-%{release} +URL: http://icl.cs.utk.edu/papi/ +# The upstream papi tar.gz file include iozone source code in it. +# The license for iozone source code is not compatible, so it needs +# to be eliminated from the srpm. +# The iozone code has been removed from the upstream papi git repo +# so when papi is rebased to a newer version it can be used as is. +Source0: http://icl.cs.utk.edu/projects/papi/downloads/%{name}-%{version}-noiozone.tar.gz +Patch1: papi-python3.patch +Patch2: papi-a64fx.patch +Patch4: papi-config.patch +Patch5: papi-nostatic.patch +Patch6: papi-lto.patch +BuildRequires: make +BuildRequires: autoconf +BuildRequires: doxygen +BuildRequires: ncurses-devel +BuildRequires: gcc-gfortran +BuildRequires: kernel-headers >= 2.6.32 +BuildRequires: chrpath +BuildRequires: lm_sensors-devel +%if %{without bundled_libpfm} +BuildRequires: libpfm-devel >= 4.6.0-1 +%if %{with_static} +BuildRequires: libpfm-static >= 4.6.0-1 +%endif +%endif +# Following required for net component +BuildRequires: net-tools +%if %{with_rdma} +# Following required for inifiband component +BuildRequires: rdma-core-devel +BuildRequires: infiniband-diags-devel +%endif +%if %{with_pcp} +BuildRequires: pcp-libs-devel +%endif +BuildRequires: perl-generators +#Right now libpfm does not know anything about s390 and will fail +ExcludeArch: s390 s390x + +%description +PAPI provides a programmer interface to monitor the performance of +running programs. + +%package libs +Summary: Libraries for PAPI clients +%description libs +This package contains the run-time libraries for any application that wishes +to use PAPI. + +%package devel +Summary: Header files for the compiling programs with PAPI +Requires: papi = %{version}-%{release} +Requires: papi-libs = %{version}-%{release} +Requires: pkgconfig +%description devel +PAPI-devel includes the C header files that specify the PAPI user-space +libraries and interfaces. This is required for rebuilding any program +that uses PAPI. + +%package testsuite +Summary: Set of tests for checking PAPI functionality +Requires: papi = %{version}-%{release} +Requires: papi-libs = %{version}-%{release} +%description testsuite +PAPI-testsuite includes compiled versions of papi tests to ensure +that PAPI functions on particular hardware. + +%if %{with_static} +%package static +Summary: Static libraries for the compiling programs with PAPI +Requires: papi = %{version}-%{release} +%description static +PAPI-static includes the static versions of the library files for +the PAPI user-space libraries and interfaces. +%endif + +%prep +%setup -q +%patch1 -p1 -b .python3 +%patch2 -p1 -b .a64fx +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 + +%build + +%if %{without bundled_libpfm} +# Build our own copy of libpfm. +%global libpfm_config --with-pfm-incdir=%{_includedir} --with-pfm-libdir=%{_libdir} +%endif + +%if %{with_static} +%global static_lib_config --with-static-lib=yes +%else +%global static_lib_config --with-static-lib=no +%endif + +# set up environment variable for the various components +# cuda +# host_micpower +%if %{with_rdma} + export PAPI_INFINIBAND_UMAD_ROOT=/usr +%endif +# lmsensors +export PAPI_LMSENSORS_ROOT=/usr +#pushd vmware; ./configure; popd +%if %{with_pcp} +%global pcp_enable pcp +export PAPI_PCP_ROOT=/usr +%endif + +cd src +autoconf +%configure --with-perf-events \ +%{?libpfm_config} \ +%{?static_lib_config} \ +--with-shared-lib=yes --with-shlib --with-shlib-tools \ +--with-components="appio coretemp example infiniband lmsensors lustre micpower mx net %{?pcp_enable} rapl stealtime" +# implicit enabled components: perf_event perf_event_uncore +#components currently left out because of build configure/build issues +# --with-components="bgpm coretemp_freebsd cuda host_micpower nvml vmware" + +#DBG workaround to make sure libpfm just uses the normal CFLAGS +DBG="" make %{?_smp_mflags} + +#generate updated versions of the documentation +#DBG workaround to make sure libpfm just uses the normal CFLAGS +pushd ../doc +DBG="" make +DBG="" make install +popd + +%install +rm -rf $RPM_BUILD_ROOT +cd src +make DESTDIR=$RPM_BUILD_ROOT LDCONFIG=/bin/true install-all + +chrpath --delete $RPM_BUILD_ROOT%{_libdir}/*.so* + +%files +%{_bindir}/* +%dir /usr/share/papi +/usr/share/papi/papi_events.csv +%doc INSTALL.txt README.md LICENSE.txt RELEASENOTES.txt +%doc %{_mandir}/man1/* + +%ldconfig_scriptlets libs + +%files libs +%{_libdir}/*.so.* +%doc INSTALL.txt README.md LICENSE.txt RELEASENOTES.txt + +%files devel +%{_includedir}/*.h +%if %{with bundled_libpfm} +%{_includedir}/perfmon/*.h +%endif +%{_libdir}/*.so +%{_libdir}/pkgconfig/papi*.pc +%doc %{_mandir}/man3/* + +%files testsuite +/usr/share/papi/run_tests* +/usr/share/papi/ctests +/usr/share/papi/ftests +/usr/share/papi/validation_tests +/usr/share/papi/components +/usr/share/papi/testlib + +%if %{with_static} +%files static +%{_libdir}/*.a +%endif + +%changelog +* Thu Nov 04 2021 William Cohen - 6.0.0-11 +- Allow build with LTO enable. rhbz#1986635 + +* Mon Aug 09 2021 Mohan Boddu - 6.0.0-10 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Wed Jun 16 2021 William Cohen - 6.0.0-9 +- Excise iozone code from papi source tarball. Resolves: rhbz#1972870 + +* Fri Apr 16 2021 Mohan Boddu - 6.0.0-8 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Thu Jan 28 2021 William Cohen - 6.0.0-7 +- By default disable genaration of static libraries. + +* Tue Jan 26 2021 Fedora Release Engineering - 6.0.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Dec 17 2020 William Cohen - 6.0.0-5 +- Remove iozone source code. (#1901077) + +* Mon Nov 09 2020 William Cohen - 6.0.0-4 +- Add Fujitsu A64FX presets. + +* Tue Jul 28 2020 Fedora Release Engineering - 6.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 01 2020 Jeff Law - 6.0.0-2 +- Disable LTO + +* Wed Mar 04 2020 William Cohen - 6.0.0-1 +- Rebase to official papi-6.0.0. + +* Wed Jan 29 2020 Fedora Release Engineering - 5.7.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jul 26 2019 Fedora Release Engineering - 5.7.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Mar 04 2019 William Cohen - 5.7.0-2 +- Rebase to official papi-5.7.0. + +* Mon Feb 18 2019 William Cohen - 5.7.0-1 +- Rebase to papi-5.7.0. + +* Fri Feb 01 2019 Fedora Release Engineering - 5.6.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Jan 7 2019 William Cohen - 5.6.0-9 +- Correct typo in papi-testsuite description. +- Add papi-libs for papi-testsuite and papi-devel. + +* Fri Nov 2 2018 Fedora Release Engineering - 5.6.0-8 +- Pull in patch to avoid division-by-0. + +* Fri Jul 13 2018 Fedora Release Engineering - 5.6.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu May 17 2018 William Cohen - 5.6.0-6 +- Dynamically link utilities and tests to papi libraries. + +* Mon Apr 30 2018 William Cohen - 5.6.0-5 +- Include various LDFLAGS/CFLAGS. + +* Thu Feb 08 2018 Fedora Release Engineering - 5.6.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Jan 31 2018 William Cohen - 5.6.0-3 +- Bump and rebuild. + +* Thu Dec 21 2017 William Cohen - 5.6.0-2 +- Correct infiniband buildrequires. + +* Thu Dec 21 2017 William Cohen - 5.6.0-1 +- Rebase to papi-5.6.0. + +* Mon Aug 28 2017 Honggang LI - 5.5.1-6 +- Disable RDMA support on ARM32 + +* Thu Aug 03 2017 Fedora Release Engineering - 5.5.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 5.5.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 5.5.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 2 2017 William Cohen - 5.5.1-2 +- Bump version and rebuild due to new libgfortan.so version. + +* Fri Nov 18 2016 Fedora Release Engineering - 5.5.1-1 +- Rebase to papi-5.5.1. + +* Wed Sep 14 2016 Fedora Release Engineering - 5.5.0-1 +- Rebase to papi-5.5.0. + +* Thu Feb 04 2016 Fedora Release Engineering - 5.4.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Jan 26 2016 William Cohen - 5.4.3-1 +- Rebase to papi-5.4.3. + +* Thu Jun 18 2015 Fedora Release Engineering - 5.4.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri Mar 6 2015 William Cohen - 5.4.1-2 +- Make sure using libpfm-4.6.0. + +* Tue Mar 3 2015 William Cohen - 5.4.1-1 +- Rebase to papi-5.4.1. + +* Wed Feb 11 2015 William Cohen - 5.4.0-3 +- Bump version and rebuild. + +* Thu Dec 18 2014 William Cohen - 5.4.0-2 +- Split out papi-libs as separate subpackage. (#1172875) + +* Mon Nov 17 2014 William Cohen - 5.4.0-1 +- Rebase to papi-5.4.0. + +* Sun Aug 17 2014 Fedora Release Engineering - 5.3.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Mon Aug 4 2014 William Cohen - 5.3.2-1 +- Rebase to 5.3.2. + +* Fri Jun 06 2014 Fedora Release Engineering - 5.3.0-2.16.ga7f6159 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri Jan 17 2014 Lukas Berk - 5.3.0-1.16.ga7f6159 +- Automated weekly rawhide release + +* Thu Jan 16 2014 William Cohen - 5.3.0-1 +- Rebase to 5.3.0. + +* Tue Jan 14 2014 William Cohen - 5.2.0-5 +- Add presets for Intel Silvermont. + +* Mon Jan 13 2014 William Cohen - 5.2.0-4 +- Add presets for Haswell and Ivy Bridge. + +* Wed Aug 14 2013 William Cohen - 5.2.0-2 +- Enable infiniband and stealtime components. + +* Wed Aug 07 2013 William Cohen - 5.2.0-1 +- Rebase to 5.2.0 + +* Sat Aug 03 2013 Fedora Release Engineering - 5.1.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jul 24 2013 William Cohen - 5.1.1-7 +- rhbz830275 - Add support for POWER8 processor to PAPI + +* Mon Jul 22 2013 William Cohen - 5.1.1-6 +- Add autoconf buildrequires. + +* Mon Jul 22 2013 William Cohen - 5.1.1-5 +- rhbz986673 - /usr/lib64/libpapi.so is unowned +- Package files in /usr/share/papi only once. +- Avoid dependency problem with parallel make of man pages. + +* Fri Jul 19 2013 William Cohen - 5.1.1-4 +- Correct changelog. + +* Fri Jul 5 2013 William Cohen - 5.1.1-3 +- Add man page corrections/updates. + +* Fri Jun 28 2013 William Cohen - 5.1.1-2 +- Add testsuite subpackage. + +* Thu May 30 2013 William Cohen - 5.1.1-1 +- Rebase to 5.1.1 + +* Mon Apr 15 2013 William Cohen - 5.1.0.2-2 +- Fix arm FTBS rhbz 951806. + +* Tue Apr 9 2013 William Cohen - 5.1.0.2-1 +- Rebase to 5.1.0.2 + +* Thu Feb 14 2013 Fedora Release Engineering - 5.0.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Jan 14 2013 William Cohen - 5.0.1-5 +- Add armv7 cortex a15 presets. + +* Tue Dec 04 2012 William Cohen - 5.0.1-4 +- Disable ldconfig on install. + +* Thu Nov 08 2012 William Cohen - 5.0.1-3 +- Avoid duplicated shared library. + +* Wed Oct 03 2012 William Cohen - 5.0.1-2 +- Make sure using compatible version of libpfm. + +* Thu Sep 20 2012 William Cohen - 5.0.1-1 +- Rebase to 5.0.1. + +* Mon Sep 10 2012 William Cohen - 5.0.0-6 +- Back port fixes for Intel Ivy Bridge event presets. + +* Thu Aug 30 2012 William Cohen - 5.0.0-5 +- Fixes to make papi with unbundled libpfm. + +* Mon Aug 27 2012 William Cohen - 5.0.0-2 +- Keep libpfm unbundled. + +* Fri Aug 24 2012 William Cohen - 5.0.0-1 +- Rebase to 5.0.0. + +* Fri Jul 20 2012 Fedora Release Engineering - 4.4.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jun 11 2012 William Cohen - 4.4.0-4 +- Use siginfo_t rather than struct siginfo. + +* Mon Jun 11 2012 William Cohen - 4.4.0-3 +- Correct build requires. + +* Mon Jun 11 2012 William Cohen - 4.4.0-2 +- Unbundle libpfm4 from papi. +- Correct description spellings. +- Remove unused test section. + +* Fri Apr 20 2012 William Cohen - 4.4.0-1 +- Rebase to 4.4.0. + +* Fri Mar 9 2012 William Cohen - 4.2.1-2 +- Fix overrun in lmsensor component. (rhbz797692) + +* Tue Feb 14 2012 William Cohen - 4.2.1-1 +- Rebase to 4.2.1. + +* Fri Jan 13 2012 Fedora Release Engineering - 4.2.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Nov 02 2011 William Cohen - 4.2.0-3 +- Remove unwanted man1/*.c.1 files. (rhbz749725) + +* Mon Oct 31 2011 William Cohen - 4.2.0-2 +- Include appropirate man pages with papi rpm. (rhbz749725) +- Rebase to papi-4.2.0, fixup for coretemp component. (rhbz746851) + +* Thu Oct 27 2011 William Cohen - 4.2.0-1 +- Rebase to papi-4.2.0. + +* Fri Aug 12 2011 William Cohen - 4.1.3-3 +- Provide papi-static. + +* Thu May 12 2011 William Cohen - 4.1.3-2 +- Use corrected papi-4.1.3. + +* Thu May 12 2011 William Cohen - 4.1.3-1 +- Rebase to papi-4.1.3 + +* Tue Feb 08 2011 Fedora Release Engineering - 4.1.2.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Jan 24 2011 William Cohen - 4.1.2.1-1 +- Rebase to papi-4.1.2.1 + +* Fri Oct 1 2010 William Cohen - 4.1.1-1 +- Rebase to papi-4.1.1 + +* Tue Jun 22 2010 William Cohen - 4.1.0-1 +- Rebase to papi-4.1.0 + +* Mon May 17 2010 William Cohen - 4.0.0-5 +- Test run with upstream cvs version. + +* Wed Feb 10 2010 William Cohen - 4.0.0-4 +- Resolves: rhbz562935 Rebase to papi-4.0.0 (correct ExcludeArch). + +* Wed Feb 10 2010 William Cohen - 4.0.0-3 +- Resolves: rhbz562935 Rebase to papi-4.0.0 (bump nvr). + +* Wed Feb 10 2010 William Cohen - 4.0.0-2 +- correct the ctests/shlib test +- have PAPI_set_multiplex() return proper value +- properly handle event unit masks +- correct PAPI_name_to_code() to match events +- Resolves: rhbz562935 Rebase to papi-4.0.0 + +* Wed Jan 13 2010 William Cohen - 4.0.0-1 +- Generate papi.spec file for papi-4.0.0.