Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make fprintf error message more informative (including error code returned by papi_add_event) #113

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions config/macros.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand Down Expand Up @@ -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=""
Expand Down
2 changes: 1 addition & 1 deletion src/tracer/hwc/papi_hwc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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; */
}
Expand Down
13 changes: 13 additions & 0 deletions tests/functional/xml/check_Extrae_xml_envvar_counters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}.???
Expand Down