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

Reproducing the results from the TACO paper #4

Open
yijunyu opened this issue Jan 31, 2024 · 5 comments
Open

Reproducing the results from the TACO paper #4

yijunyu opened this issue Jan 31, 2024 · 5 comments

Comments

@yijunyu
Copy link

yijunyu commented Jan 31, 2024

Hi,

I have some trouble in reproducing the results by following the README. To record the problem more precisely, I have done the following in the experiments:

  1. installed the Ubuntu 22.04 LTS on top of a PC running the CPU of Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz.
  2. installed the prerequisite software packages sudo apt install -y git gcc g++ make cmake.
  3. issued the initial make command, which ends successfully.
  4. The problem occurs when I am running make accuracy. It reports the following error message:
gcc reuse-invalidation-benchs/reuse-invalidation.c -o reuse-invalidation-benchs/reuse-invalidation -fopenmp
#rm -r short_rd_inc_output
PWD=`pwd` && HPCRUN_WP_REUSE_PROFILE_TYPE="TEMPORAL" HPCRUN_PROFILE_L3=false HPCRUN_WP_CACHELINE_INVALIDATION=true HPCRUN_WP_DONT_FIX_IP=true HPCRUN_WP_DONT_DISASSEMBLE_TRIGGER_ADDRESS=true OMP_NUM_THREADS=32 HPCRUN_WP_REUSE_BIN_SCHEME=1100,2 /usr/bin/time -f "Elapsed Time , %e, system, %S, user, %U, memory, %M" /home/yijun/ReuseTracker/reusetracker-bin/bin/hpcrun  -o short_inc_output -e WP_REUSETRACKER -e MEM_UOPS_RETIRED:ALL_LOADS@100000 -e MEM_UOPS_RETIRED:ALL_STORES@100000 reuse-invalidation-benchs/reuse-invalidation -outer 10 -a0 20 -a1 1000 -b0 20 -b1 2000 -c0 20 -c1 4000 -d0 20 -d1 8000 -e0 20 -e1 16000 -inv 1 2>&1 | tee short_rd_inc_log
[89168, N]: Bad file descriptor: Failed with -1 on line 361 of file sample-sources/watchpoint_support.c
  1. To diagnose the problem, the error comes from the following file ./hpctoolkit/src/tool/hpcrun/sample-sources/watchpoint_support.c
   341      struct perf_event_attr peLBR = {
   342        .type                   = PERF_TYPE_BREAKPOINT,
   343        .size                   = sizeof(struct perf_event_attr),
   344        .bp_type                = HW_BREAKPOINT_W,
   345        .bp_len                 = HW_BREAKPOINT_LEN_1,
   346        .bp_addr                = (uintptr_t)&dummyWP[0],
   347        .sample_period          = 1,
   348        .precise_ip             = 0 /* arbitraty skid */,
   349        .sample_type            = 0,
   350        .exclude_user           = 0,
   351        .exclude_kernel         = 1,
   352        .exclude_hv             = 1,
   353        .disabled               = 0, /* enabled */
   354      };
   355      int fd =  perf_event_open(&peLBR, 0, -1, -1 /*group*/, 0);
   356      if (fd != -1) {
   357        wpConfig.isLBREnabled = true;
   358      } else {
   359        wpConfig.isLBREnabled = false;
   360      }
   361      CHECK(close(fd));

Could you take a look at it to see how to address this problem?

Thanks !

@msasongko17
Copy link
Collaborator

msasongko17 commented Feb 19, 2024

Hi, I apologize for the late reply. I forgot to mark this repo as a watched repo.

So, I have tried to reinstall and rerun ReuseTracker on an Intel(R) Xeon(R) Gold 6258R CPU @ 2.70GHz machine running a Linux kernel version 5.11.0. Everything seems to work normally. Your machine might be running a much newer kernel. I will try to run ReuseTracker also on Linux kernel 6.0+ to check if I can reproduce the error.

Meanwhile, you need to make sure that you have permission to configure and read PMU counters and debug registers by running "sudo sysctl -w kernel.perf_event_paranoid=-1" first, in case you have not done it.

@yijunyu
Copy link
Author

yijunyu commented Feb 19, 2024

Thank you Dr Sasongko for the suggestion, I've tried the sudo command earlier so probably it was not the cause. I could also take a look at an older version of Linux kernel 5.11.0 next week, in parallel to your effort. -- Yijun

@yijunyu
Copy link
Author

yijunyu commented Feb 20, 2024

FYI, we were able to run the tool on a PC with older Intel CPU, with Ubuntu 20.04 LTS (default Linux kernel is 5.15 release),so no more blocker for our experiments.

How to get it work on our PC running newer OS kernel we hope to hear your feedback too. -- Yijun

@msasongko17
Copy link
Collaborator

Dear Yijun,

Unfortunately, it seems that I won't be able to fix this problem immediately. I have been trying to install Linux version 6.0+ in the most recent Intel machine in our lab (which is still pretty old compared to the latest version in the market). However, the installation seems to require me to uninstall some important drivers that are needed by other people in the lab. There are also approaching paper submission deadlines that other people in the lab and I are working towards. So, I think I won't be able to work on it in the next few weeks. -- Aditya

@yijunyu
Copy link
Author

yijunyu commented Feb 24, 2024

Dear Aditya, that's OK. As I said in previous message, it is a non-blocker for us now, please take your time. -- Yijun

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

No branches or pull requests

2 participants