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

Configure | run_test.sh : Disable perf_event and perf_event_uncore #237

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

djwoun
Copy link
Contributor

@djwoun djwoun commented Sep 17, 2024

Pull Request Description

--disable-perf-event-uncore Disable perf_event_uncore component
--disable-perf-event Disable perf_event component(disabling perf_event will disable perf_event_uncore as well)
--disable-cpu Disable perf_event and perf_event_uncore component

configure/configure.in

  • Added --disable-cpu, --disable-perf-event, --disable-perf-event-uncore.
  • Disabled sysdetect if perf-event is disabled
  • Changed AC_MSG_ERRORAC_MSG_RESULT.
  • added awk statements to comment ctest/ftest/vtest in Makefile.inc.
  • Reinstates them if disabling CPU is not specified.
  • Changed a condition for enabling perf_events on for "if eval test "x$"$as_ac_File"" = x"yes"; then :"

Run_tests.sh

  • Checks for perf_event.
  • If not enabled, ctests ftests vtests do not run.

Darwin-common.h

  • Retrieve the current thread's ID using pthread_self(), but instead of returning the pthread_t value directly, it copies the memory of the pthread_t into a pid_t variable and returns it.
  • Added missing library: #include <pthread.h>.

Darwin-common.c & darwin-memory.c

  • Added missing library: #include <sys/sysctl.h>.

threads.c

  • macOS-specific thread ID function.

Print_header.c

  • Checks if perf_event is missing and returns "NA" if it isn’t present.
  • Displays: Number of Hardware Counters : PAPI error -1: Invalid argument.
    • This only happens for ROCm.
    • Says "NA" for ROCm.
    • Else: displays 0 or the number of hardware counters of other devices.
    • If there are no components enabled, options is null. This results in the last print statement to segfault, so now it checks if the options variable is NULL.
    • When there are 0 components. Max Multiplex Counters : PAPI error -4: Not supported by component

CUDA Support

  • Nvidia stopped supporting cuda for macos

Author Checklist

  • Description
    Why this PR exists. Reference all relevant information, including background, issues, test failures, etc
  • Commits
    Commits are self contained and only do one thing
    Commits have a header of the form: module: short description
    Commits have a body (whenever relevant) containing a detailed description of the addressed problem and its solution
  • Tests
    The PR needs to pass all the tests

@djwoun djwoun force-pushed the config_perf branch 4 times, most recently from f7b2192 to 9a13e0a Compare September 17, 2024 17:50
@djwoun djwoun requested a review from dbarry9 September 17, 2024 17:51
@djwoun djwoun marked this pull request as draft October 11, 2024 15:20
@djwoun djwoun force-pushed the config_perf branch 4 times, most recently from c1ca1e1 to 11cbfcc Compare October 15, 2024 03:01
@djwoun djwoun marked this pull request as ready for review October 15, 2024 03:01
@djwoun djwoun requested a review from jagode October 16, 2024 14:59
Copy link
Collaborator

@jagode jagode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In configure, I'm not sure where "as_fn_result" originates from. If I rerun autoconf on configure.in, it disappears and configure works fine. However, without it, I receive the following error:

checking for timer_create and timer_*ettime symbols in -lrt -lpthread... ./configure: line 4463: as_fn_result: command not found

Since we need to regenerate the configure file anyway, could you please make the following change to line 232 in configure.in before rerunning autoconf?:

diff --git a/src/configure.in b/src/configure.in
index 53f3dd63..c04fa823 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -232,7 +232,7 @@ else
                         AC_MSG_RESULT([found])
                         LRT="-lrt -lpthread"
                 else
-                       AC_MSG_RESULT([cannot find timer_create and timer_*ettime symbols neither in the base system libraries nor in -lrt, nor in -lrt -lpthread])
+                       AC_MSG_RESULT([not found])
                fi
        fi
 fi

src/configure Outdated Show resolved Hide resolved
Dong Jun Woun and others added 6 commits November 13, 2024 11:37
…ncurrent_profiling to build correctly on glibc < 2.34.
The previous definition counted floating-point instructions instead of
operations. Added note to papi_events.csv that explains how to scale and
combine native events to measure all FLOPs with multiplexing.

These changes have been tested on the IBM POWER9 and POWER10
architectures.
@djwoun
Copy link
Contributor Author

djwoun commented Nov 13, 2024

Components would get configured even if the user provided an empty "--with-components="". Daniel and I figured out a new check to ensure that the component would only be configured when there wouldn't be an empty string.

This problem didn't appear in gcc 11.4 but did in 12.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants