Compare commits
26 Commits
master
...
f37-riscv6
Author | SHA1 | Date | |
---|---|---|---|
9cf9703cd1 | |||
|
29cf6d80ba | ||
|
3e4ef2f3db | ||
|
a4709e9f0b | ||
|
95b143bbc2 | ||
|
60da07ee04 | ||
|
ab0e12886d | ||
|
f7922c2de0 | ||
|
228ec2f6c6 | ||
|
1dd3fab657 | ||
|
da1be156da | ||
|
e4a7325618 | ||
|
63e57c54e8 | ||
|
38a004385b | ||
|
dc7fa6a1cf | ||
|
dc9f280bee | ||
|
ee9819b49e | ||
|
443e63983f | ||
|
c5484afa10 | ||
|
1de8ab1497 | ||
|
1d7877a582 | ||
|
2bbc7906f1 | ||
|
5d3dda1a4c | ||
|
179bda3ca1 | ||
|
f46477a5c6 | ||
|
aae2d4600f |
2
.gitignore
vendored
2
.gitignore
vendored
@ -22,3 +22,5 @@ papi-4.1.0.tar.gz
|
|||||||
/papi-5.5.0.tar.gz
|
/papi-5.5.0.tar.gz
|
||||||
/papi-5.5.1.tar.gz
|
/papi-5.5.1.tar.gz
|
||||||
/papi-5.6.0.tar.gz
|
/papi-5.6.0.tar.gz
|
||||||
|
/papi-5.7.0.tar.gz
|
||||||
|
/papi-6.0.0.tar.gz
|
||||||
|
98
0001-Add-initial-support-for-riscv64.patch
Normal file
98
0001-Add-initial-support-for-riscv64.patch
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
From 8467f9cfe483bf4d0c14c1fba200cb6fb429f996 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Abdurachmanov <davidlt@rivosinc.com>
|
||||||
|
Date: Fri, 23 Sep 2022 09:42:45 +0300
|
||||||
|
Subject: [PATCH] Add initial support for riscv64
|
||||||
|
|
||||||
|
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
|
||||||
|
---
|
||||||
|
src/configure | 2 +-
|
||||||
|
src/configure.in | 2 +-
|
||||||
|
src/libpfm4/config.mk | 3 +++
|
||||||
|
src/linux-context.h | 2 ++
|
||||||
|
src/linux-timer.c | 2 +-
|
||||||
|
src/mb.h | 3 +++
|
||||||
|
6 files changed, 11 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/configure b/src/configure
|
||||||
|
index fb18bf4..4f5ab04 100755
|
||||||
|
--- a/src/configure
|
||||||
|
+++ b/src/configure
|
||||||
|
@@ -4709,7 +4709,7 @@ _ACEOF
|
||||||
|
|
||||||
|
# First set pthread-mutexes based on arch
|
||||||
|
case $arch in
|
||||||
|
- aarch64|arm*|parisc*)
|
||||||
|
+ aarch64|arm*|parisc*|riscv*)
|
||||||
|
pthread_mutexes=yes
|
||||||
|
CFLAGS="$CFLAGS -DUSE_PTHREAD_MUTEXES"
|
||||||
|
echo "forcing use of pthread mutexes... " >&6
|
||||||
|
diff --git a/src/configure.in b/src/configure.in
|
||||||
|
index f78cca2..9b4ae9f 100644
|
||||||
|
--- a/src/configure.in
|
||||||
|
+++ b/src/configure.in
|
||||||
|
@@ -410,7 +410,7 @@ AC_DEFINE_UNQUOTED(CPU,$CPU,[cpu type])
|
||||||
|
|
||||||
|
# First set pthread-mutexes based on arch
|
||||||
|
case $arch in
|
||||||
|
- aarch64|arm*|parisc*)
|
||||||
|
+ aarch64|arm*|parisc*|riscv*)
|
||||||
|
pthread_mutexes=yes
|
||||||
|
CFLAGS="$CFLAGS -DUSE_PTHREAD_MUTEXES"
|
||||||
|
echo "forcing use of pthread mutexes... " >&6
|
||||||
|
diff --git a/src/libpfm4/config.mk b/src/libpfm4/config.mk
|
||||||
|
index daa982e..8e8e482 100644
|
||||||
|
--- a/src/libpfm4/config.mk
|
||||||
|
+++ b/src/libpfm4/config.mk
|
||||||
|
@@ -177,6 +177,9 @@ ifeq ($(ARCH),cell)
|
||||||
|
CONFIG_PFMLIB_CELL=y
|
||||||
|
endif
|
||||||
|
|
||||||
|
+ifeq ($(ARCH),riscv64)
|
||||||
|
+CONFIG_PFMLIB_ARCH_RISCV64=y
|
||||||
|
+endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# you shouldn't have to touch anything beyond this point
|
||||||
|
diff --git a/src/linux-context.h b/src/linux-context.h
|
||||||
|
index 858c4e9..de52ee4 100644
|
||||||
|
--- a/src/linux-context.h
|
||||||
|
+++ b/src/linux-context.h
|
||||||
|
@@ -37,6 +37,8 @@ typedef ucontext_t hwd_ucontext_t;
|
||||||
|
#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.pc
|
||||||
|
#elif defined(__hppa__)
|
||||||
|
#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.sc_iaoq[0]
|
||||||
|
+#elif defined(__riscv)
|
||||||
|
+#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.__gregs[REG_PC]
|
||||||
|
#else
|
||||||
|
#error "OVERFLOW_ADDRESS() undefined!"
|
||||||
|
#endif
|
||||||
|
diff --git a/src/linux-timer.c b/src/linux-timer.c
|
||||||
|
index 71b4aa0..97dfc53 100644
|
||||||
|
--- a/src/linux-timer.c
|
||||||
|
+++ b/src/linux-timer.c
|
||||||
|
@@ -281,7 +281,7 @@ static inline long long get_cycles()
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
-#elif (defined(__arm__) || defined(__mips__) || defined(__hppa__))
|
||||||
|
+#elif (defined(__arm__) || defined(__mips__) || defined(__hppa__) || defined(__riscv))
|
||||||
|
static inline long long
|
||||||
|
get_cycles( void )
|
||||||
|
{
|
||||||
|
diff --git a/src/mb.h b/src/mb.h
|
||||||
|
index 1019691..0b82a9d 100644
|
||||||
|
--- a/src/mb.h
|
||||||
|
+++ b/src/mb.h
|
||||||
|
@@ -39,6 +39,9 @@
|
||||||
|
#elif defined(__aarch64__)
|
||||||
|
#define rmb() asm volatile("dmb ld" ::: "memory")
|
||||||
|
|
||||||
|
+#elif defined(__riscv)
|
||||||
|
+#define rmb() asm volatile("fence ir, ir" ::: "memory")
|
||||||
|
+
|
||||||
|
#elif defined(__mips__)
|
||||||
|
#define rmb() asm volatile( \
|
||||||
|
".set mips2\n\t" \
|
||||||
|
--
|
||||||
|
2.35.1
|
||||||
|
|
34
papi-a64fx.patch
Normal file
34
papi-a64fx.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
commit 9a44d82928ed17ba2ff21eb88b89c5829d0ea30e
|
||||||
|
Author: Steve Kaufmann <steven.kaufmann@hpe.com>
|
||||||
|
Date: Wed Jun 24 14:08:08 2020 -0400
|
||||||
|
|
||||||
|
Added PAPI preset support for Fujitsu A64FX.
|
||||||
|
|
||||||
|
Signed-off-by: Heike Jagode <jagode@icl.utk.edu>
|
||||||
|
|
||||||
|
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
|
||||||
|
#
|
348
papi-config.patch
Normal file
348
papi-config.patch
Normal file
@ -0,0 +1,348 @@
|
|||||||
|
commit 38290c41abbb105ca198411ec3c466ac027f5b8f
|
||||||
|
Author: Frank Winkler <frankbook@Franks-MacBook-Air.local>
|
||||||
|
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 <frankbook@Franks-MacBook-Air.local>
|
||||||
|
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 <frankbook@Franks-MacBook-Air.local>
|
||||||
|
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 <frankbook@franks-air.localdomain>
|
||||||
|
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 ) {
|
106
papi-init_thread.patch
Normal file
106
papi-init_thread.patch
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
commit 3625bdbad9fd57d1cdb1e5615854545167d4adcb
|
||||||
|
Author: Anthony Castaldo <TonyCastaldo@icl.utk.edu>
|
||||||
|
Date: Wed Aug 26 17:18:29 2020 -0400
|
||||||
|
|
||||||
|
This modifies PAPI_library_init() to initialize components in two classes,
|
||||||
|
separated by the initialization of the papi thread structure. The first class
|
||||||
|
is those that need no thread structure, currently everything but perf_event and
|
||||||
|
perf_event_uncore. Following the init of the threading structure, we init the
|
||||||
|
second class (perf_event and perf_event_uncore) that DOES need the thread
|
||||||
|
structure to successfully init_component(). This required a change to
|
||||||
|
_papi_hwi_init_global(), to add an argument to distinguish which class it
|
||||||
|
should initialize.
|
||||||
|
|
||||||
|
diff --git a/src/papi.c b/src/papi.c
|
||||||
|
index 33cc29935..ed75af493 100644
|
||||||
|
--- a/src/papi.c
|
||||||
|
+++ b/src/papi.c
|
||||||
|
@@ -1151,7 +1151,23 @@ PAPI_library_init( int version )
|
||||||
|
papi_return( init_retval );
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* Initialize thread globals, including the main threads */
|
||||||
|
+ /* Initialize component globals EXCEPT for perf_event, perf_event_uncore.
|
||||||
|
+ * To avoid race conditions, these components use the thread local storage
|
||||||
|
+ * construct initialized by _papi_hwi_init_global_threads(), from within
|
||||||
|
+ * their init_component(). So these must have init_component() run AFTER
|
||||||
|
+ * _papi_hwi_init_global_threads. Other components demand that init threads
|
||||||
|
+ * run AFTER init_component(), which sets up globals they need.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+ tmp = _papi_hwi_init_global( 0 ); /* Selector 0 to skip perf_event, perf_event_uncore */
|
||||||
|
+ if ( tmp ) {
|
||||||
|
+ init_retval = tmp;
|
||||||
|
+ _papi_hwi_shutdown_global_internal( );
|
||||||
|
+ _in_papi_library_init_cnt--;
|
||||||
|
+ papi_return( init_retval );
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Initialize thread globals, including the main threads */
|
||||||
|
|
||||||
|
tmp = _papi_hwi_init_global_threads( );
|
||||||
|
if ( tmp ) {
|
||||||
|
@@ -1161,9 +1177,9 @@ PAPI_library_init( int version )
|
||||||
|
papi_return( init_retval );
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* Initialize component globals */
|
||||||
|
+ /* Initialize perf_event, perf_event_uncore components */
|
||||||
|
|
||||||
|
- tmp = _papi_hwi_init_global( );
|
||||||
|
+ tmp = _papi_hwi_init_global( 1 ); /* Selector 1 for only perf_event, perf_event_uncore */
|
||||||
|
if ( tmp ) {
|
||||||
|
init_retval = tmp;
|
||||||
|
_papi_hwi_shutdown_global_internal( );
|
||||||
|
diff --git a/src/papi_internal.c b/src/papi_internal.c
|
||||||
|
index 5a1ccd433..e6dd319c2 100644
|
||||||
|
--- a/src/papi_internal.c
|
||||||
|
+++ b/src/papi_internal.c
|
||||||
|
@@ -1928,11 +1928,13 @@ int papi_num_components = ( sizeof ( _papi_hwd ) / sizeof ( *_papi_hwd ) ) - 1;
|
||||||
|
* Routine that initializes all available components.
|
||||||
|
* A component is available if a pointer to its info vector
|
||||||
|
* appears in the NULL terminated_papi_hwd table.
|
||||||
|
+ * Modified to accept an arg: 0=do not init perf_event or
|
||||||
|
+ * perf_event_uncore. 1=init ONLY perf_event or perf_event_uncore.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
-_papi_hwi_init_global( void )
|
||||||
|
+_papi_hwi_init_global( int PE_OR_PEU )
|
||||||
|
{
|
||||||
|
- int retval, i = 0;
|
||||||
|
+ int retval, is_pe_peu, i = 0;
|
||||||
|
|
||||||
|
retval = _papi_hwi_innoculate_os_vector( &_papi_os_vector );
|
||||||
|
if ( retval != PAPI_OK ) {
|
||||||
|
@@ -1940,14 +1942,16 @@ _papi_hwi_init_global( void )
|
||||||
|
}
|
||||||
|
|
||||||
|
while ( _papi_hwd[i] ) {
|
||||||
|
-
|
||||||
|
+ is_pe_peu = 0;
|
||||||
|
+ if (strcmp(_papi_hwd[i]->cmp_info.name, "perf_event") == 0) is_pe_peu=1;
|
||||||
|
+ if (strcmp(_papi_hwd[i]->cmp_info.name, "perf_event_uncore") == 0) is_pe_peu=1;
|
||||||
|
retval = _papi_hwi_innoculate_vector( _papi_hwd[i] );
|
||||||
|
if ( retval != PAPI_OK ) {
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* We can be disabled by user before init */
|
||||||
|
- if (!_papi_hwd[i]->cmp_info.disabled) {
|
||||||
|
+ if (!_papi_hwd[i]->cmp_info.disabled && (PE_OR_PEU == is_pe_peu)) {
|
||||||
|
retval = _papi_hwd[i]->init_component( i );
|
||||||
|
_papi_hwd[i]->cmp_info.disabled=retval;
|
||||||
|
|
||||||
|
diff --git a/src/papi_internal.h b/src/papi_internal.h
|
||||||
|
index 6492fea4e..e0f5acd74 100644
|
||||||
|
--- a/src/papi_internal.h
|
||||||
|
+++ b/src/papi_internal.h
|
||||||
|
@@ -467,7 +467,7 @@ int _papi_hwi_read( hwd_context_t * context, EventSetInfo_t * ESI,
|
||||||
|
long long *values );
|
||||||
|
int _papi_hwi_cleanup_eventset( EventSetInfo_t * ESI );
|
||||||
|
int _papi_hwi_convert_eventset_to_multiplex( _papi_int_multiplex_t * mpx );
|
||||||
|
-int _papi_hwi_init_global( void );
|
||||||
|
+int _papi_hwi_init_global( int PE_OR_PEU );
|
||||||
|
int _papi_hwi_init_global_internal( void );
|
||||||
|
int _papi_hwi_init_os(void);
|
||||||
|
void _papi_hwi_init_errors(void);
|
@ -1,115 +0,0 @@
|
|||||||
commit bde3da26f1f2755689e16fc9f5ab404367d1fdc8
|
|
||||||
Author: Vince Weaver <vincent.weaver@maine.edu>
|
|
||||||
Date: Wed Jan 24 14:13:28 2018 -0500
|
|
||||||
|
|
||||||
build: fix various LDFLAGS/CFLAGS issues
|
|
||||||
|
|
||||||
issues were reported by Andreas Beckmann <anbe@debian.org>
|
|
||||||
|
|
||||||
diff --git a/src/components/Makefile_comp_tests.target.in b/src/components/Makefile_comp_tests.target.in
|
|
||||||
index 9a369adb..a4412bea 100644
|
|
||||||
--- a/src/components/Makefile_comp_tests.target.in
|
|
||||||
+++ b/src/components/Makefile_comp_tests.target.in
|
|
||||||
@@ -9,7 +9,7 @@ INCLUDE = -I. -I@includedir@ -I$(datadir) -I$(testlibdir) -I$(validationlibdir)
|
|
||||||
LIBDIR = @libdir@
|
|
||||||
PAPILIB = $(datadir)/@LIBRARY@
|
|
||||||
TESTLIB = $(testlibdir)/libtestlib.a
|
|
||||||
-LDFLAGS = @LDL@
|
|
||||||
+LDFLAGS = @LDFLAGS@ @LDL@
|
|
||||||
CC = @CC@
|
|
||||||
F77 = @F77@
|
|
||||||
CC_R = @CC_R@
|
|
||||||
diff --git a/src/components/perf_event_uncore/tests/Makefile b/src/components/perf_event_uncore/tests/Makefile
|
|
||||||
index 3ee8fc2a..d70debe6 100644
|
|
||||||
--- a/src/components/perf_event_uncore/tests/Makefile
|
|
||||||
+++ b/src/components/perf_event_uncore/tests/Makefile
|
|
||||||
@@ -17,19 +17,19 @@ perf_event_uncore_lib.o: perf_event_uncore_lib.c perf_event_uncore_lib.h
|
|
||||||
|
|
||||||
|
|
||||||
perf_event_amd_northbridge: perf_event_amd_northbridge.o $(DOLOOPS) $(UTILOBJS) $(PAPILIB) $(DOLOOPS)
|
|
||||||
- $(CC) $(LFLAGS) -o perf_event_amd_northbridge perf_event_amd_northbridge.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
|
||||||
+ $(CC) $(CFLAGS) -o perf_event_amd_northbridge perf_event_amd_northbridge.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
|
||||||
|
|
||||||
perf_event_uncore: perf_event_uncore.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) perf_event_uncore_lib.o
|
|
||||||
- $(CC) $(LFLAGS) -o perf_event_uncore perf_event_uncore.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
|
||||||
+ $(CC) $(CFLAGS) -o perf_event_uncore perf_event_uncore.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
|
||||||
|
|
||||||
perf_event_uncore_attach: perf_event_uncore_attach.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) perf_event_uncore_lib.o
|
|
||||||
- $(CC) $(LFLAGS) -o perf_event_uncore_attach perf_event_uncore_attach.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
|
||||||
+ $(CC) $(CFLAGS) -o perf_event_uncore_attach perf_event_uncore_attach.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
|
||||||
|
|
||||||
perf_event_uncore_multiple: perf_event_uncore_multiple.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB)
|
|
||||||
- $(CC) $(LFLAGS) $(INCLUDE) -o perf_event_uncore_multiple perf_event_uncore_multiple.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
|
||||||
+ $(CC) $(CFLAGS) $(INCLUDE) -o perf_event_uncore_multiple perf_event_uncore_multiple.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
|
||||||
|
|
||||||
perf_event_uncore_cbox: perf_event_uncore_cbox.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB)
|
|
||||||
- $(CC) $(LFLAGS) $(INCLUDE) -o perf_event_uncore_cbox perf_event_uncore_cbox.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
|
||||||
+ $(CC) $(CFLAGS) $(INCLUDE) -o perf_event_uncore_cbox perf_event_uncore_cbox.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/ctests/Makefile.recipies b/src/ctests/Makefile.recipies
|
|
||||||
index 63c107c0..201f3c85 100644
|
|
||||||
--- a/src/ctests/Makefile.recipies
|
|
||||||
+++ b/src/ctests/Makefile.recipies
|
|
||||||
@@ -350,7 +350,7 @@ code2name: code2name.c $(TESTLIB) $(PAPILIB)
|
|
||||||
$(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) code2name.c $(TESTLIB) $(PAPILIB) $(LDFLAGS) -o code2name
|
|
||||||
|
|
||||||
attach_target: attach_target.c $(DOLOOPS)
|
|
||||||
- -$(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) attach_target.c -o attach_target $(DOLOOPS) $(TESTLIB)
|
|
||||||
+ -$(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) attach_target.c -o attach_target $(DOLOOPS) $(TESTLIB) $(LDFLAGS)
|
|
||||||
|
|
||||||
zero_attach: zero_attach.c $(TESTLIB) $(DOLOOPS) $(PAPILIB)
|
|
||||||
-$(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) zero_attach.c $(TESTLIB) $(DOLOOPS) $(PAPILIB) $(LDFLAGS) -o zero_attach
|
|
||||||
diff --git a/src/ctests/Makefile.target.in b/src/ctests/Makefile.target.in
|
|
||||||
index bb51c350..fcc3373b 100644
|
|
||||||
--- a/src/ctests/Makefile.target.in
|
|
||||||
+++ b/src/ctests/Makefile.target.in
|
|
||||||
@@ -12,7 +12,7 @@ LIBRARY=@LIBRARY@
|
|
||||||
SHLIB=@SHLIB@
|
|
||||||
PAPILIB = ../@LINKLIB@
|
|
||||||
TESTLIB = $(testlibdir)/libtestlib.a
|
|
||||||
-LDFLAGS = @LDL@ @STATIC@
|
|
||||||
+LDFLAGS = @LDFLAGS@ @LDL@ @STATIC@
|
|
||||||
CC = @CC@
|
|
||||||
MPICC = @MPICC@
|
|
||||||
F77 = @F77@
|
|
||||||
diff --git a/src/ftests/Makefile.target.in b/src/ftests/Makefile.target.in
|
|
||||||
index 718586e5..8006dd8d 100644
|
|
||||||
--- a/src/ftests/Makefile.target.in
|
|
||||||
+++ b/src/ftests/Makefile.target.in
|
|
||||||
@@ -11,7 +11,7 @@ LIBRARY = @LIBRARY@
|
|
||||||
SHLIB=@SHLIB@
|
|
||||||
PAPILIB = ../@LINKLIB@
|
|
||||||
TESTLIB = $(testlibdir)/libtestlib.a
|
|
||||||
-LDFLAGS = @LDL@
|
|
||||||
+LDFLAGS = @LDFLAGS@ @LDL@
|
|
||||||
CC = @CC@
|
|
||||||
F77 = @F77@
|
|
||||||
CC_R = @CC_R@
|
|
||||||
diff --git a/src/utils/Makefile.target.in b/src/utils/Makefile.target.in
|
|
||||||
index a5eab438..58d438a1 100644
|
|
||||||
--- a/src/utils/Makefile.target.in
|
|
||||||
+++ b/src/utils/Makefile.target.in
|
|
||||||
@@ -11,7 +11,7 @@ LIBRARY=@LIBRARY@
|
|
||||||
SHLIB=@SHLIB@
|
|
||||||
PAPILIB = ../@LINKLIB@
|
|
||||||
TESTLIB = $(testlibdir)/libtestlib.a
|
|
||||||
-LDFLAGS = @LDL@ @STATIC@
|
|
||||||
+LDFLAGS = @LDFLAGS@ @LDL@ @STATIC@
|
|
||||||
CC = @CC@
|
|
||||||
MPICC = @MPICC@
|
|
||||||
F77 = @F77@
|
|
||||||
diff --git a/src/validation_tests/Makefile.target.in b/src/validation_tests/Makefile.target.in
|
|
||||||
index a5eab438..58d438a1 100644
|
|
||||||
--- a/src/validation_tests/Makefile.target.in
|
|
||||||
+++ b/src/validation_tests/Makefile.target.in
|
|
||||||
@@ -11,7 +11,7 @@ LIBRARY=@LIBRARY@
|
|
||||||
SHLIB=@SHLIB@
|
|
||||||
PAPILIB = ../@LINKLIB@
|
|
||||||
TESTLIB = $(testlibdir)/libtestlib.a
|
|
||||||
-LDFLAGS = @LDL@ @STATIC@
|
|
||||||
+LDFLAGS = @LDFLAGS@ @LDL@ @STATIC@
|
|
||||||
CC = @CC@
|
|
||||||
MPICC = @MPICC@
|
|
||||||
F77 = @F77@
|
|
34628
papi-no-iozone.patch
Normal file
34628
papi-no-iozone.patch
Normal file
File diff suppressed because it is too large
Load Diff
30
papi-nostatic.patch
Normal file
30
papi-nostatic.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
commit cc34c978778adb40df1a200059a31c8d628b10ee
|
||||||
|
Author: William Cohen <wcohen@redhat.com>
|
||||||
|
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
|
||||||
|
|
10
papi-python3.patch
Normal file
10
papi-python3.patch
Normal file
@ -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
|
||||||
|
|
160
papi.spec
160
papi.spec
@ -1,3 +1,5 @@
|
|||||||
|
# Default to no static libraries
|
||||||
|
%{!?with_static: %global with_static 0}
|
||||||
%bcond_with bundled_libpfm
|
%bcond_with bundled_libpfm
|
||||||
# rdma is not available
|
# rdma is not available
|
||||||
%ifarch %{arm}
|
%ifarch %{arm}
|
||||||
@ -5,16 +7,23 @@
|
|||||||
%else
|
%else
|
||||||
%{!?with_rdma: %global with_rdma 1}
|
%{!?with_rdma: %global with_rdma 1}
|
||||||
%endif
|
%endif
|
||||||
|
%{!?with_pcp: %global with_pcp 1}
|
||||||
Summary: Performance Application Programming Interface
|
Summary: Performance Application Programming Interface
|
||||||
Name: papi
|
Name: papi
|
||||||
Version: 5.6.0
|
Version: 6.0.0
|
||||||
Release: 6%{?dist}
|
Release: 12.0.riscv64%{?dist}
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: Development/System
|
|
||||||
Requires: papi-libs = %{version}-%{release}
|
Requires: papi-libs = %{version}-%{release}
|
||||||
URL: http://icl.cs.utk.edu/papi/
|
URL: http://icl.cs.utk.edu/papi/
|
||||||
Source0: http://icl.cs.utk.edu/projects/papi/downloads/%{name}-%{version}.tar.gz
|
Source0: http://icl.cs.utk.edu/projects/papi/downloads/%{name}-%{version}.tar.gz
|
||||||
Patch1: papi-ldflags.patch
|
Patch1: papi-python3.patch
|
||||||
|
Patch2: papi-a64fx.patch
|
||||||
|
Patch3: papi-no-iozone.patch
|
||||||
|
Patch4: papi-config.patch
|
||||||
|
Patch5: papi-nostatic.patch
|
||||||
|
Patch6: papi-init_thread.patch
|
||||||
|
Patch9: 0001-Add-initial-support-for-riscv64.patch
|
||||||
|
BuildRequires: make
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
@ -24,8 +33,10 @@ BuildRequires: chrpath
|
|||||||
BuildRequires: lm_sensors-devel
|
BuildRequires: lm_sensors-devel
|
||||||
%if %{without bundled_libpfm}
|
%if %{without bundled_libpfm}
|
||||||
BuildRequires: libpfm-devel >= 4.6.0-1
|
BuildRequires: libpfm-devel >= 4.6.0-1
|
||||||
|
%if %{with_static}
|
||||||
BuildRequires: libpfm-static >= 4.6.0-1
|
BuildRequires: libpfm-static >= 4.6.0-1
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
# Following required for net component
|
# Following required for net component
|
||||||
BuildRequires: net-tools
|
BuildRequires: net-tools
|
||||||
%if %{with_rdma}
|
%if %{with_rdma}
|
||||||
@ -33,6 +44,9 @@ BuildRequires: net-tools
|
|||||||
BuildRequires: rdma-core-devel
|
BuildRequires: rdma-core-devel
|
||||||
BuildRequires: infiniband-diags-devel
|
BuildRequires: infiniband-diags-devel
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with_pcp}
|
||||||
|
BuildRequires: pcp-libs-devel
|
||||||
|
%endif
|
||||||
BuildRequires: perl-generators
|
BuildRequires: perl-generators
|
||||||
#Right now libpfm does not know anything about s390 and will fail
|
#Right now libpfm does not know anything about s390 and will fail
|
||||||
ExcludeArch: s390 s390x
|
ExcludeArch: s390 s390x
|
||||||
@ -43,15 +57,14 @@ running programs.
|
|||||||
|
|
||||||
%package libs
|
%package libs
|
||||||
Summary: Libraries for PAPI clients
|
Summary: Libraries for PAPI clients
|
||||||
Group: Development/System
|
|
||||||
%description libs
|
%description libs
|
||||||
This package contains the run-time libraries for any application that wishes
|
This package contains the run-time libraries for any application that wishes
|
||||||
to use PAPI.
|
to use PAPI.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Header files for the compiling programs with PAPI
|
Summary: Header files for the compiling programs with PAPI
|
||||||
Group: Development/System
|
|
||||||
Requires: papi = %{version}-%{release}
|
Requires: papi = %{version}-%{release}
|
||||||
|
Requires: papi-libs = %{version}-%{release}
|
||||||
Requires: pkgconfig
|
Requires: pkgconfig
|
||||||
%description devel
|
%description devel
|
||||||
PAPI-devel includes the C header files that specify the PAPI user-space
|
PAPI-devel includes the C header files that specify the PAPI user-space
|
||||||
@ -60,53 +73,74 @@ that uses PAPI.
|
|||||||
|
|
||||||
%package testsuite
|
%package testsuite
|
||||||
Summary: Set of tests for checking PAPI functionality
|
Summary: Set of tests for checking PAPI functionality
|
||||||
Group: Development/System
|
|
||||||
Requires: papi = %{version}-%{release}
|
Requires: papi = %{version}-%{release}
|
||||||
|
Requires: papi-libs = %{version}-%{release}
|
||||||
%description testsuite
|
%description testsuite
|
||||||
PAPI-testuiste includes compiled versions of papi tests to ensure
|
PAPI-testsuite includes compiled versions of papi tests to ensure
|
||||||
that PAPI functions on particular hardware.
|
that PAPI functions on particular hardware.
|
||||||
|
|
||||||
|
%if %{with_static}
|
||||||
%package static
|
%package static
|
||||||
Summary: Static libraries for the compiling programs with PAPI
|
Summary: Static libraries for the compiling programs with PAPI
|
||||||
Group: Development/System
|
|
||||||
Requires: papi = %{version}-%{release}
|
Requires: papi = %{version}-%{release}
|
||||||
%description static
|
%description static
|
||||||
PAPI-static includes the static versions of the library files for
|
PAPI-static includes the static versions of the library files for
|
||||||
the PAPI user-space libraries and interfaces.
|
the PAPI user-space libraries and interfaces.
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1 -b .ldflags
|
%patch1 -p1 -b .python3
|
||||||
|
%patch2 -p1 -b .a64fx
|
||||||
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
|
%patch6 -p1 -b .thread
|
||||||
|
%patch9 -p1 -b .riscv64
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
# This package fails to build with LTO due to undefined symbols. LTO
|
||||||
|
# was disabled in OpenSuSE as well, but with no real explanation why
|
||||||
|
# beyond the undefined symbols. It really shold be investigated further.
|
||||||
|
# Disable LTO
|
||||||
|
%define _lto_cflags %{nil}
|
||||||
|
|
||||||
%if %{without bundled_libpfm}
|
%if %{without bundled_libpfm}
|
||||||
# Build our own copy of libpfm.
|
# Build our own copy of libpfm.
|
||||||
%global libpfm_config --with-pfm-incdir=%{_includedir} --with-pfm-libdir=%{_libdir}
|
%global libpfm_config --with-pfm-incdir=%{_includedir} --with-pfm-libdir=%{_libdir}
|
||||||
%endif
|
%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
|
cd src
|
||||||
autoconf
|
autoconf
|
||||||
%configure --with-perf-events \
|
%configure --with-perf-events \
|
||||||
%{?libpfm_config} \
|
%{?libpfm_config} \
|
||||||
--with-static-lib=yes --with-shared-lib=yes --with-shlib --with-shlib-tools \
|
%{?static_lib_config} \
|
||||||
--with-components="appio coretemp example infiniband lmsensors lustre micpower mx net rapl stealtime"
|
--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
|
# implicit enabled components: perf_event perf_event_uncore
|
||||||
#components currently left out because of build configure/build issues
|
#components currently left out because of build configure/build issues
|
||||||
# --with-components="bgpm coretemp_freebsd cuda host_micpower nvml vmware"
|
# --with-components="bgpm coretemp_freebsd cuda host_micpower nvml vmware"
|
||||||
|
|
||||||
pushd components
|
|
||||||
#pushd cuda; ./configure; popd
|
|
||||||
#pushd host_micpower; ./configure; popd
|
|
||||||
%if %{with_rdma}
|
|
||||||
pushd infiniband_umad; %configure; popd
|
|
||||||
%endif
|
|
||||||
pushd lmsensors; \
|
|
||||||
%configure --with-sensors_incdir=/usr/include/sensors \
|
|
||||||
--with-sensors_libdir=%{_libdir}; \
|
|
||||||
popd
|
|
||||||
#pushd vmware; ./configure; popd
|
|
||||||
popd
|
|
||||||
|
|
||||||
#DBG workaround to make sure libpfm just uses the normal CFLAGS
|
#DBG workaround to make sure libpfm just uses the normal CFLAGS
|
||||||
DBG="" make %{?_smp_mflags}
|
DBG="" make %{?_smp_mflags}
|
||||||
|
|
||||||
@ -122,21 +156,21 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
cd src
|
cd src
|
||||||
make DESTDIR=$RPM_BUILD_ROOT LDCONFIG=/bin/true install-all
|
make DESTDIR=$RPM_BUILD_ROOT LDCONFIG=/bin/true install-all
|
||||||
|
|
||||||
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/*.so*
|
# Scrub the rpath/runpath from all the binaries.
|
||||||
|
find %{buildroot} -type f -executable ! -iname "*.py" ! -iname "*.sh" | xargs chrpath --delete
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%dir /usr/share/papi
|
%dir /usr/share/papi
|
||||||
/usr/share/papi/papi_events.csv
|
/usr/share/papi/papi_events.csv
|
||||||
%doc INSTALL.txt README LICENSE.txt RELEASENOTES.txt
|
%doc INSTALL.txt README.md LICENSE.txt RELEASENOTES.txt
|
||||||
%doc %{_mandir}/man1/*
|
%doc %{_mandir}/man1/*
|
||||||
|
|
||||||
%post libs -p /sbin/ldconfig
|
%ldconfig_scriptlets libs
|
||||||
%postun libs -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%files libs
|
%files libs
|
||||||
%{_libdir}/*.so.*
|
%{_libdir}/*.so.*
|
||||||
%doc INSTALL.txt README LICENSE.txt RELEASENOTES.txt
|
%doc INSTALL.txt README.md LICENSE.txt RELEASENOTES.txt
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_includedir}/*.h
|
%{_includedir}/*.h
|
||||||
@ -155,10 +189,76 @@ chrpath --delete $RPM_BUILD_ROOT%{_libdir}/*.so*
|
|||||||
/usr/share/papi/components
|
/usr/share/papi/components
|
||||||
/usr/share/papi/testlib
|
/usr/share/papi/testlib
|
||||||
|
|
||||||
|
%if %{with_static}
|
||||||
%files static
|
%files static
|
||||||
%{_libdir}/*.a
|
%{_libdir}/*.a
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Sep 23 2022 David Abdurachmanov <davidlt@rivosinc.com> - 6.0.0-12.0.riscv64
|
||||||
|
- Add initial support for riscv64
|
||||||
|
|
||||||
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-12
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-11
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Nov 19 2021 William Cohen <wcohen@redhat.com> - 6.0.0-10
|
||||||
|
- Correct initialization for stealtime component.
|
||||||
|
|
||||||
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jun 2 2021 William Cohen <wcohen@redhat.com> - 6.0.0-8
|
||||||
|
- Scrub rpaths from all executables.
|
||||||
|
|
||||||
|
* Thu Jan 28 2021 William Cohen <wcohen@redhat.com> - 6.0.0-7
|
||||||
|
- By default disable genaration of static libraries.
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Dec 17 2020 William Cohen <wcohen@redhat.com> - 6.0.0-5
|
||||||
|
- Remove iozone source code. (#1901077)
|
||||||
|
|
||||||
|
* Mon Nov 09 2020 William Cohen <wcohen@redhat.com> - 6.0.0-4
|
||||||
|
- Add Fujitsu A64FX presets.
|
||||||
|
|
||||||
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 01 2020 Jeff Law <law@redhat.com> - 6.0.0-2
|
||||||
|
- Disable LTO
|
||||||
|
|
||||||
|
* Wed Mar 04 2020 William Cohen <wcohen@redhat.com> - 6.0.0-1
|
||||||
|
- Rebase to official papi-6.0.0.
|
||||||
|
|
||||||
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.7.0-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.7.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Mar 04 2019 William Cohen <wcohen@redhat.com> - 5.7.0-2
|
||||||
|
- Rebase to official papi-5.7.0.
|
||||||
|
|
||||||
|
* Mon Feb 18 2019 William Cohen <wcohen@redhat.com> - 5.7.0-1
|
||||||
|
- Rebase to papi-5.7.0.
|
||||||
|
|
||||||
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.6.0-10
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jan 7 2019 William Cohen <wcohen@redhat.com> - 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 <releng@fedoraproject.org> - 5.6.0-8
|
||||||
|
- Pull in patch to avoid division-by-0.
|
||||||
|
|
||||||
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.6.0-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
* Thu May 17 2018 William Cohen <wcohen@redhat.com> - 5.6.0-6
|
* Thu May 17 2018 William Cohen <wcohen@redhat.com> - 5.6.0-6
|
||||||
- Dynamically link utilities and tests to papi libraries.
|
- Dynamically link utilities and tests to papi libraries.
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (papi-5.6.0.tar.gz) = b2a1536f220081d08ee9bc94fddbf422e36c60c55b0536bc43dec074bdaf23afaedbdd755b7e6af25c4c0ce582cc7ad4c59e2adc1801e75c482d472b080439be
|
SHA512 (papi-6.0.0.tar.gz) = 2a4a245d64c3ac05ca9664194ac406cfb360fc0935afdee115ca0fc3f24b6051d1130426ed959fac2f711a2239100b37a4dfe8e0885697f4f4c049554c95258a
|
||||||
|
Loading…
Reference in New Issue
Block a user