diff --git a/config/macros.m4 b/config/macros.m4 index 83cdd56a..602593d4 100644 --- a/config/macros.m4 +++ b/config/macros.m4 @@ -779,6 +779,8 @@ AC_DEFUN([AX_PROG_BINUTILS], elif test -r "${binutils_home_dir}/lib/libbfd.a" -a \ "${binutils_require_shared}" = "no" ; then BFD_LIBSDIR="${binutils_home_dir}/lib" + elif test -r "${binutils_home_dir}/libbfd.so" ; then + BFD_LIBSDIR="${binutils_home_dir}" else dnl Try something more automatic using find command libbfd_lib="" @@ -814,6 +816,8 @@ AC_DEFUN([AX_PROG_BINUTILS], LIBERTY_LIBSDIR="${binutils_home_dir}/lib" elif test -r "${binutils_home_dir}/lib/libiberty.a" ; then LIBERTY_LIBSDIR="${binutils_home_dir}/lib" + elif test -r "${binutils_home_dir}/libiberty.a" ; then + LIBERTY_LIBSDIR="${binutils_home_dir}" else dnl Try something more automatic using find command libiberty_lib="" diff --git a/src/tracer/hwc/papi_hwc.c b/src/tracer/hwc/papi_hwc.c index c9f5c158..4bd71c3f 100644 --- a/src/tracer/hwc/papi_hwc.c +++ b/src/tracer/hwc/papi_hwc.c @@ -615,7 +615,7 @@ int HWCBE_PAPI_Init_Thread (UINT64 time, int threadid, int forked) char EventName[PAPI_MAX_STR_LEN]; PAPI_event_code_to_name (HWC_sets[i].counters[j], EventName); - fprintf (stderr, PACKAGE_NAME": Error! Hardware counter %s (0x%08x) cannot be added in set %d (task %d, thread %d)\n", EventName, HWC_sets[i].counters[j], i+1, TASKID, threadid); + fprintf (stderr, PACKAGE_NAME": Error! Hardware counter %s (0x%08x) cannot be added in set %d (task %d, thread %d) because PAPI_add_event returned %d\n", EventName, HWC_sets[i].counters[j], i+1, TASKID, threadid, rc); HWC_sets[i].counters[j] = NO_COUNTER; /* break; */ } diff --git a/tests/functional/xml/check_Extrae_xml_envvar_counters.sh b/tests/functional/xml/check_Extrae_xml_envvar_counters.sh index 51f35c2d..21950cbb 100755 --- a/tests/functional/xml/check_Extrae_xml_envvar_counters.sh +++ b/tests/functional/xml/check_Extrae_xml_envvar_counters.sh @@ -11,6 +11,19 @@ COUNTERS=PAPI_TOT_INS EXTRAE_CONFIG_FILE=extrae_envvar_counters.xml ./check_Extr ../../../src/merger/mpi2prv -f TRACE.mpits -o ${TRACE}.prv # Check +if ! command -v papi_avail &> /dev/null +then + echo "papi_avail could not be found" + exit 0 +fi + +PAPI_TOT_CYC_available=`papi_avail | grep PAPI_TOT_CYC | awk '{print $3}'` +if [[ "$PAPI_TOT_CYC_available" == No ]] +then + echo "PAPI_TOT_CYC is not available" + exit 0 +fi + CheckEntryInPCF ${TRACE}.pcf PAPI_TOT_INS rm -fr TRACE* set-0 ${TRACE}.???