nus-comparch / looppoint

Sampled simulation of multi-threaded applications using LoopPoint methodology
https://looppoint.github.io
12 stars 7 forks source link

I received an error while executing the command "./run-looppoint.py -p demo-matrix-1 -n 8 --force" #1

Closed kbtxwer closed 1 year ago

kbtxwer commented 2 years ago
Executing Python script /home/kbtx/looppoint/results/demo-matrix-1-test-passive-8-20220711012007/simulation/wp/sim.scripts.py
[SNIPER] --------------------------------------------------------------------------------
[SNIPER] Sniper using SIFT/trace-driven frontend
[SNIPER] Running full application in DETAILED mode
[SNIPER] --------------------------------------------------------------------------------
[SNIPER] Enabling performance models
[SNIPER] Setting instrumentation mode to DETAILED
[RECORD-TRACE] Using the Pin frontend (sift/recorder)
[SIFT_RECORDER] Running ~/looppoint/tools/sniper/pin_kit/pin -mt -injection child -xyzzy -ifeellucky -follow_execv 1  -t ~/looppoint/tools/sniper/sift/recorder/obj-intel64/sift_recorder -verbose 1 -debug 0 -roi 0 -roi-mpi 0 -f 0 -d 0 -b 0 -o /tmp/tmpKuPmdE/run_benchmarks -e 1 -s 0 -r 1 -pa 0 -rtntrace 1 -stop 0  -sniper:flow 1000  -- ./base.exe 100 8
**NFE: unknown option "-sniper:flow"**
**Error, invalid parameters**

It seems that -sniper:flow shouldn't appear in the commandline, and after which, I got these following messages:

[SNIPER] WARNING: No SIFT connections made yet. Waiting...
[SNIPER] ERROR: Could not establish SIFT connection, aborting! Check benchmark-app*.log for errors.
[SNIPER] End
[SNIPER] Elapsed time: 60.22 seconds

Then, each running command got an end with "Cannot find script file simuserroi"

Running command:
/run-sniper        -n 8        -v -sprogresstrace:10000000 -gtraceinput/timeout=2000 -gscheduler/type=static -cgainestown --trace-args=-sniper:flow 1000 -ssimuserroi --roi-script --trace-args=-control start:address:0x404690:count1:global --trace-args=-control stop:address:0x408018:count6775173:global -gperf_model/fast_forward/oneipc/interval=100 -ggeneral/inst_mode_init=detailed -gperf_model/fast_forward/oneipc/include_memory_latency=true -d /home/kbtx/looppoint/results/demo-matrix-1-test-passive-8-20220711012007/simulation/r1        -- ./base.exe 100 8
[PREPROCESS] matrix-omp
[PREPROCESS] apps/demo/matrix-omp/matrix-omp
[PREPROCESS] /home/kbtx/looppoint/apps/demo/matrix-omp/matrix-omp
[PREPROCESS] symlinking matrix-omp /tmp/tmpGxsc5W/base.exe
[PREPROCESS] apps/demo/matrix-omp/test
[PREPROCESS] /home/kbtx/looppoint/apps/demo/matrix-omp/test
[PREPROCESS] symlinking /home/kbtx/looppoint/apps/demo/matrix-omp/test/matrix-omp.3.cfg /tmp/tmpGxsc5W/matrix-omp.3.cfg
[PREPROCESS] symlinking /home/kbtx/looppoint/apps/demo/matrix-omp/test/matrix-omp.1.cfg /tmp/tmpGxsc5W/matrix-omp.1.cfg
[PREPROCESS] symlinking /home/kbtx/looppoint/apps/demo/matrix-omp/test/matrix-omp.2.cfg /tmp/tmpGxsc5W/matrix-omp.2.cfg
[PREPROCESS] Done
Cannot find script file simuserroi

I wander if the script should be gengrated in the step which reports "unknown option "-sniper:flow" " , and how to fix it?

alenks commented 2 years ago

@kbtxwer, The README.md file was a bit out of date, but I just updated it to match some of the recent changes we made to the LoopPoint code. Thanks for pointing this out. Please do make distclean and follow the instructions in README.

kbtxwer commented 2 years ago

Thank you very much. I have remake the LoopPoint and run the test script again, however, I still get these following errors, could you help me to figure out what goes wrong again?

in app terminated abnormally due to signal 6.
[SNIPER] Disabling performance models
[SNIPER] Leaving ROI after 3982.12 seconds
[SNIPER] Simulated 869.5M instructions, 1587.3M cycles, 0.55 IPC
[SNIPER] Simulation speed 218.3 KIPS (27.3 KIPS / target core - 36640.1ns/instr)
[SNIPER] Setting instrumentation mode to FAST_FORWARD
[SNIPER] End
[SNIPER] Elapsed time: 3982.32 seconds
[PREPROCESS] dotproduct-omp
[PREPROCESS] apps/demo/dotproduct-omp/dotproduct-omp
[PREPROCESS] /home/kbtx/looppoint/apps/demo/dotproduct-omp/dotproduct-omp
[PREPROCESS] symlinking dotproduct-omp /tmp/tmpNCPzJj/base.exe
[PREPROCESS] apps/demo/dotproduct-omp/test
[PREPROCESS] /home/kbtx/looppoint/apps/demo/dotproduct-omp/test
[PREPROCESS] symlinking /home/kbtx/looppoint/apps/demo/dotproduct-omp/test/dotproduct-omp.1.cfg /tmp/tmpNCPzJj/dotproduct-omp.1.cfg
[PREPROCESS] Done
Cannot find script file simuserroi
[PREPROCESS] dotproduct-omp
[PREPROCESS] apps/demo/dotproduct-omp/dotproduct-omp
[PREPROCESS] /home/kbtx/looppoint/apps/demo/dotproduct-omp/dotproduct-omp
[PREPROCESS] symlinking dotproduct-omp /tmp/tmpGI_FCb/base.exe
[PREPROCESS] apps/demo/dotproduct-omp/test
[PREPROCESS] /home/kbtx/looppoint/apps/demo/dotproduct-omp/test
[PREPROCESS] symlinking /home/kbtx/looppoint/apps/demo/dotproduct-omp/test/dotproduct-omp.1.cfg /tmp/tmpGI_FCb/dotproduct-omp.1.cfg
[PREPROCESS] Done
Cannot find script file simuserroi
[PREPROCESS] dotproduct-omp
[PREPROCESS] apps/demo/dotproduct-omp/dotproduct-omp
[PREPROCESS] /home/kbtx/looppoint/apps/demo/dotproduct-omp/dotproduct-omp
[PREPROCESS] symlinking dotproduct-omp /tmp/tmpuTzGAW/base.exe
[PREPROCESS] apps/demo/dotproduct-omp/test
[PREPROCESS] /home/kbtx/looppoint/apps/demo/dotproduct-omp/test
[PREPROCESS] symlinking /home/kbtx/looppoint/apps/demo/dotproduct-omp/test/dotproduct-omp.1.cfg /tmp/tmpuTzGAW/dotproduct-omp.1.cfg
[PREPROCESS] Done
Cannot find script file simuserroi
[PREPROCESS] dotproduct-omp
[PREPROCESS] apps/demo/dotproduct-omp/dotproduct-omp
[PREPROCESS] /home/kbtx/looppoint/apps/demo/dotproduct-omp/dotproduct-omp
[PREPROCESS] symlinking dotproduct-omp /tmp/tmpFOMrT5/base.exe
[PREPROCESS] apps/demo/dotproduct-omp/test
[PREPROCESS] /home/kbtx/looppoint/apps/demo/dotproduct-omp/test
[PREPROCESS] symlinking /home/kbtx/looppoint/apps/demo/dotproduct-omp/test/dotproduct-omp.1.cfg /tmp/tmpFOMrT5/dotproduct-omp.1.cfg
[PREPROCESS] Done
Cannot find script file simuserroi
[PREPROCESS] dotproduct-omp
[PREPROCESS] apps/demo/dotproduct-omp/dotproduct-omp
[PREPROCESS] /home/kbtx/looppoint/apps/demo/dotproduct-omp/dotproduct-omp
[PREPROCESS] symlinking dotproduct-omp /tmp/tmp9wWNoc/base.exe
[PREPROCESS] apps/demo/dotproduct-omp/test
[PREPROCESS] /home/kbtx/looppoint/apps/demo/dotproduct-omp/test
[PREPROCESS] symlinking /home/kbtx/looppoint/apps/demo/dotproduct-omp/test/dotproduct-omp.1.cfg /tmp/tmp9wWNoc/dotproduct-omp.1.cfg
[PREPROCESS] Done
Cannot find script file simuserroi
[LOOPPOINT] Collecting results for dotproduct-omp.1 using test input class and passive OMP wait policy
[LOOPPOINT] Error: Simulation results not found for r1
[LOOPPOINT] Error: Simulation results not found for r2
[LOOPPOINT] Error: Simulation results not found for r3
[LOOPPOINT] Error: Simulation results not found for r4
[LOOPPOINT] Error: Simulation results not found for r5
[LOOPPOINT] Warning: Skipping r1 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r3 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r2 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r5 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r4 as the simulation results are not available
Traceback (most recent call last):
  File "./run-looppoint.py", line 643, in <module>
    run(args, update_config, res_tab)
  File "./run-looppoint.py", line 562, in run
    res_tab.append(evaluate(config))
  File "./run-looppoint.py", line 379, in evaluate
    extrapolated_runtime = extrapolated_runtime/coverage
ZeroDivisionError: float division by zero

The full log is attached: looppoint.log.txt

alenks commented 2 years ago

It seems like an older version of Sniper has been downloaded. Can you go to tools directory, manually delete sniper directory, and then go back to the base directory to do make clean && make apps && make tools? Sniper, if you run the default command, should ideally run the frontend using Intel SDE, but I can see in the log you shared that the frontend is using Pin.

kbtxwer commented 2 years ago

I think I got the sniper v7.4, because I have forked it into my own space to ensure the download speed image Anyway, I will try again and feedback later.

kbtxwer commented 2 years ago

Besides, I think

sniper_args += ['--trace-args="-sniper:flow 1000"']

might be a typo and should replaced with

sniper_args += ['--trace-args="-flow 1000"']
kbtxwer commented 2 years ago

It seems like an older version of Sniper has been downloaded. Can you go to tools directory, manually delete sniper directory, and then go back to the base directory to do make clean && make apps && make tools? Sniper, if you run the default command, should ideally run the frontend using Intel SDE, but I can see in the log you shared that the frontend is using Pin.

I tried again, but it still use Pin as default frontend.

Here is the latest output: demo-matrix-1-test-passive-8-20220711124043_2.zip

alenks commented 2 years ago

If you see the Makefile in the base directory of LoopPoint, you can see that we have set SNIPER_GIT_REPO?=https://github.com/snipersim/snipersim.git which should download the latest version of Sniper (v8.0 and not v7.4). Are you modifying this link? For Sniper v8.0, the default frontend is SDE, and there were some changes to the frontend flags (like using -sniper:flow instead of -flow etc).

kbtxwer commented 2 years ago

If you see the Makefile in the base directory of LoopPoint, you can see that we have set SNIPER_GIT_REPO?=https://github.com/snipersim/snipersim.git which should download the latest version of Sniper (v8.0 and not v7.4). Are you modifying this link? For Sniper v8.0, the default frontend is SDE, and there were some changes to the frontend flags (like using -sniper:flow instead of -flow etc).

Ah, yes. I have noticed that and re-import the repo after some failed attempts. However, there are some errors which still exist in the last step

[LOOPPOINT] Collecting results for dotproduct-omp.1 using test input class and passive OMP wait policy
[LOOPPOINT] Error: Unable to fetch results for r1.
[LOOPPOINT] Error: Simulation results not found for r1
[LOOPPOINT] Error: Unable to fetch results for r3.
[LOOPPOINT] Error: Simulation results not found for r3
[LOOPPOINT] Error: Unable to fetch results for r4.
[LOOPPOINT] Error: Simulation results not found for r4
[LOOPPOINT] Error: Unable to fetch results for r6.
[LOOPPOINT] Error: Simulation results not found for r6
[LOOPPOINT] Error: Unable to fetch results for r7.
[LOOPPOINT] Error: Simulation results not found for r7
[LOOPPOINT] Error: Unable to fetch results for r9.
[LOOPPOINT] Error: Simulation results not found for r9
[LOOPPOINT] Error: Unable to fetch results for r11.
[LOOPPOINT] Error: Simulation results not found for r11
[LOOPPOINT] Error: Unable to fetch results for r12.
[LOOPPOINT] Error: Simulation results not found for r12
[LOOPPOINT] Error: Unable to fetch results for r13.
[LOOPPOINT] Error: Simulation results not found for r13
[LOOPPOINT] Warning: Skipping r11 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r13 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r12 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r1 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r3 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r4 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r7 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r6 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r9 as the simulation results are not available
Traceback (most recent call last):
  File "./run-looppoint.py", line 642, in <module>
    run(args, update_config, res_tab)
  File "./run-looppoint.py", line 561, in run
    res_tab.append(evaluate(config))
  File "./run-looppoint.py", line 378, in evaluate
    extrapolated_runtime = extrapolated_runtime/coverage
ZeroDivisionError: float division by zero

I now run it in the docker container.

Still, the full log is attached here. looppoint.log.txt demo-dotproduct-1-test-passive-8-20220711091648.tar.gz.zip

(I am sorry but the error log seems only appear in the terminal)

alenks commented 2 years ago

From the logfile, what I can see is that the representative region specifications are not triggered during simulation. However, support for LoopPoint region specifications were added to Sniper 8.0 and therefore it is not clear why there is an issue. Maybe, start with a fresh copy of LoopPoint (clone from GitHub). You do not need to build the docker image again. Do make to launch the docker instance; within the instance do make apps to compile the demo applications and make tools for downloading and building the necessary tools including Sniper. There is no other intervention required otherwise.

kbtxwer commented 2 years ago

I have clean up and remake apps and tools.

This time, I add some print scripts in function get_sim_res(config, sim_path, profile_path, region = None) in run-looppoint.py, and I got these following messages:

[LOOPPOINT] Collecting results for dotproduct-omp.1 using test input class and passive OMP wait policy
[GET_SIM_RES] dir /home/kbtx/looppoint/results/demo-dotproduct-1-test-passive-8-default/simulation, region wp
[GET_SIM_RES] dir /home/kbtx/looppoint/results/demo-dotproduct-1-test-passive-8-20220712032408/simulation, region r1
[LOOPPOINT] Error: Unable to fetch results for r1.
Invalid prefix roi-begin
[LOOPPOINT] Error: Simulation results not found for r1
[GET_SIM_RES] dir /home/kbtx/looppoint/results/demo-dotproduct-1-test-passive-8-20220712032408/simulation, region r3
[LOOPPOINT] Error: Unable to fetch results for r3.
Invalid prefix roi-begin
[LOOPPOINT] Error: Simulation results not found for r3
[GET_SIM_RES] dir /home/kbtx/looppoint/results/demo-dotproduct-1-test-passive-8-20220712032408/simulation, region r4
[LOOPPOINT] Error: Unable to fetch results for r4.
Invalid prefix roi-begin
[LOOPPOINT] Error: Simulation results not found for r4
[GET_SIM_RES] dir /home/kbtx/looppoint/results/demo-dotproduct-1-test-passive-8-20220712032408/simulation, region r6
[LOOPPOINT] Error: Unable to fetch results for r6.
Invalid prefix roi-begin
[LOOPPOINT] Error: Simulation results not found for r6
[GET_SIM_RES] dir /home/kbtx/looppoint/results/demo-dotproduct-1-test-passive-8-20220712032408/simulation, region r7
[LOOPPOINT] Error: Unable to fetch results for r7.
Invalid prefix roi-begin
[LOOPPOINT] Error: Simulation results not found for r7
[GET_SIM_RES] dir /home/kbtx/looppoint/results/demo-dotproduct-1-test-passive-8-20220712032408/simulation, region r9
[LOOPPOINT] Error: Unable to fetch results for r9.
Invalid prefix roi-begin
[LOOPPOINT] Error: Simulation results not found for r9
[GET_SIM_RES] dir /home/kbtx/looppoint/results/demo-dotproduct-1-test-passive-8-20220712032408/simulation, region r11
[LOOPPOINT] Error: Unable to fetch results for r11.
Invalid prefix roi-begin
[LOOPPOINT] Error: Simulation results not found for r11
[GET_SIM_RES] dir /home/kbtx/looppoint/results/demo-dotproduct-1-test-passive-8-20220712032408/simulation, region r12
[LOOPPOINT] Error: Unable to fetch results for r12.
Invalid prefix roi-begin
[LOOPPOINT] Error: Simulation results not found for r12
[GET_SIM_RES] dir /home/kbtx/looppoint/results/demo-dotproduct-1-test-passive-8-20220712032408/simulation, region r13
[LOOPPOINT] Error: Unable to fetch results for r13.
Invalid prefix roi-begin
[LOOPPOINT] Error: Simulation results not found for r13

It seems that roi-begin is an invalid prefix, but I don't know what does that mean.

Here is the function I modified:

def get_sim_res(config, sim_path, profile_path, region = None):
  print('[GET_SIM_RES] dir %s, region %s' %(sim_path, region) )
  if region == None:
    return -1
  resultsdir = os.path.join(sim_path, region)
  try:
    res = sniper_lib.get_results(resultsdir=resultsdir)
  except (KeyError, ValueError), e:
    print('[LOOPPOINT] Error: Unable to fetch results for %s.' % region)
    print(e)
    if region == 'wp':
      exit(1)
    return -1
  results = res['results']
  config = res['config']
  return results, config

What's more, I fond all sim.out files under r* directory are empty, but sim.out under wp directory have contents inside.

kbtxwer commented 2 years ago

Also, when I modify function generate_simout in gen_simout.py to print the error information, I got Failed to generated sim.out: Invalid prefix roi-begin after a region reach to the end, which means it took a long time to execute and give out nothing.

def generate_simout(jobid = None, resultsdir = None, partial = None, output = sys.stdout, silent = False):

  try:
    res = sniper_lib.get_results(jobid = jobid, resultsdir = resultsdir, partial = partial)
  except (KeyError, ValueError), e:
    if not silent or True:
      print 'Failed to generated sim.out:', e
    return

# ...... omitted
[SIFT_RECORDER] Running /home/kbtx/looppoint/tools/sniper/sde_kit/sde64 -t64 /home/kbtx/looppoint/tools/sniper/sift/recorder/obj-intel64/sde_sift_recorder -sniper:verbose 1 -sniper:debug 0 -sniper:roi 0 -sniper:roi-mpi 0 -sniper:f 0 -sniper:d 0 -sniper:b 0 -sniper:o /tmp/tmpEWblmc/run_benchmarks -sniper:e 1  -sniper:s 0 -sniper:r 1  -sniper:pa 0 -sniper:rtntrace  1 -sniper:stop 0  -sniper:flow 1000 -control start:address:0x56214b200e80:count1587913:global -control stop:address:0x56214b2013c0:count3383238:global  -- ./base.exe
[SIFT_RECORDER:0:0] Output = [/tmp/tmpEWblmc/run_benchmarks.app0.th0.sift]
[SIFT_RECORDER:0:0] Response = [/tmp/tmpEWblmc/run_benchmarks_response.app0.th0.sift]
[SIFT_RECORDER:0:1] Output = [/tmp/tmpEWblmc/run_benchmarks.app0.th1.sift]
[SIFT_RECORDER:0:1] Response = [/tmp/tmpEWblmc/run_benchmarks_response.app0.th1.sift]
[SIFT_RECORDER:0:2] Output = [/tmp/tmpEWblmc/run_benchmarks.app0.th2.sift]
[SIFT_RECORDER:0:2] Response = [/tmp/tmpEWblmc/run_benchmarks_response.app0.th2.sift]
[SIFT_RECORDER:0:3] Output = [/tmp/tmpEWblmc/run_benchmarks.app0.th3.sift]
[SIFT_RECORDER:0:3] Response = [/tmp/tmpEWblmc/run_benchmarks_response.app0.th3.sift]
[SIFT_RECORDER:0:4] Output = [/tmp/tmpEWblmc/run_benchmarks.app0.th4.sift]
[SIFT_RECORDER:0:4] Response = [/tmp/tmpEWblmc/run_benchmarks_response.app0.th4.sift]
[SIFT_RECORDER:0:5] Output = [/tmp/tmpEWblmc/run_benchmarks.app0.th5.sift]
[SIFT_RECORDER:0:5] Response = [/tmp/tmpEWblmc/run_benchmarks_response.app0.th5.sift]
[SIFT_RECORDER:0:6] Output = [/tmp/tmpEWblmc/run_benchmarks.app0.th6.sift]
[SIFT_RECORDER:0:6] Response = [/tmp/tmpEWblmc/run_benchmarks_response.app0.th6.sift]
[SIFT_RECORDER:0:7] Output = [/tmp/tmpEWblmc/run_benchmarks.app0.th7.sift]
[SIFT_RECORDER:0:7] Response = [/tmp/tmpEWblmc/run_benchmarks_response.app0.th7.sift]
[PROGRESS] 10M instructions, 571 KIPS
[PROGRESS] 20M instructions, 1046 KIPS, 1.00 IPC
[PROGRESS] 30M instructions, 1005 KIPS, 1.00 IPC
[PROGRESS] 40M instructions, 1809 KIPS, 2.58 IPC
[PROGRESS] 50M instructions, 1004 KIPS, 1.00 IPC
[PROGRESS] 60M instructions, 1071 KIPS, 1.00 IPC
[PROGRESS] 70M instructions, 2775 KIPS, 1.00 IPC
[PROGRESS] 80M instructions, 1273 KIPS, 1.00 IPC
[PROGRESS] 90M instructions, 1066 KIPS, 1.00 IPC
[PROGRESS] 100M instructions, 1046 KIPS, 1.00 IPC
[PROGRESS] 110M instructions, 1012 KIPS, 1.00 IPC
[PROGRESS] 120M instructions, 987 KIPS, 1.00 IPC
[PROGRESS] 130M instructions, 1012 KIPS, 1.00 IPC
[PROGRESS] 140M instructions, 991 KIPS, 1.00 IPC
[PROGRESS] 150M instructions, 2568 KIPS, 5.55 IPC
[PROGRESS] 160M instructions, 2718 KIPS, 8.00 IPC
[PROGRESS] 170M instructions, 2892 KIPS, 8.00 IPC
[PROGRESS] 180M instructions, 1597 KIPS, 2.03 IPC
[PROGRESS] 190M instructions, 1007 KIPS, 1.00 IPC
[PROGRESS] 200M instructions, 994 KIPS, 1.00 IPC
[PROGRESS] 210M instructions, 1104 KIPS, 1.00 IPC
[PROGRESS] 220M instructions, 1164 KIPS, 1.00 IPC
[PROGRESS] 230M instructions, 1020 KIPS, 1.00 IPC
[PROGRESS] 240M instructions, 1454 KIPS, 1.00 IPC
[PROGRESS] 250M instructions, 1249 KIPS, 1.00 IPC
[PROGRESS] 260M instructions, 1056 KIPS, 1.00 IPC
[PROGRESS] 270M instructions, 1009 KIPS, 1.00 IPC
[PROGRESS] 280M instructions, 1076 KIPS, 1.00 IPC
[PROGRESS] 290M instructions, 2001 KIPS, 1.00 IPC
[PROGRESS] 300M instructions, 1045 KIPS, 1.00 IPC
[PROGRESS] 310M instructions, 1069 KIPS, 1.00 IPC
[PROGRESS] 320M instructions, 1470 KIPS, 1.00 IPC
[PROGRESS] 330M instructions, 1290 KIPS, 1.00 IPC
[PROGRESS] 340M instructions, 1113 KIPS, 1.00 IPC
[PROGRESS] 350M instructions, 1059 KIPS, 1.00 IPC
[PROGRESS] 360M instructions, 1052 KIPS, 1.00 IPC
[PROGRESS] 370M instructions, 1066 KIPS, 1.00 IPC
[PROGRESS] 380M instructions, 1226 KIPS, 1.00 IPC
[PROGRESS] 390M instructions, 1095 KIPS, 1.00 IPC
[PROGRESS] 400M instructions, 1082 KIPS, 1.00 IPC
[PROGRESS] 410M instructions, 1072 KIPS, 1.00 IPC
[PROGRESS] 420M instructions, 1067 KIPS, 1.00 IPC
[PROGRESS] 430M instructions, 1270 KIPS, 1.00 IPC
[PROGRESS] 440M instructions, 1097 KIPS, 1.00 IPC
[PROGRESS] 450M instructions, 1056 KIPS, 1.00 IPC
[PROGRESS] 460M instructions, 1069 KIPS, 1.00 IPC
[PROGRESS] 470M instructions, 1054 KIPS, 1.00 IPC
[PROGRESS] 480M instructions, 1053 KIPS, 1.00 IPC
[PROGRESS] 490M instructions, 984 KIPS, 1.00 IPC
[PROGRESS] 500M instructions, 981 KIPS, 1.00 IPC
[PROGRESS] 510M instructions, 989 KIPS, 1.00 IPC
[PROGRESS] 520M instructions, 989 KIPS, 1.00 IPC
[PROGRESS] 530M instructions, 1022 KIPS, 1.00 IPC
[PROGRESS] 540M instructions, 986 KIPS, 1.00 IPC
[PROGRESS] 550M instructions, 989 KIPS, 1.00 IPC
[PROGRESS] 560M instructions, 977 KIPS, 1.00 IPC
[PROGRESS] 570M instructions, 1005 KIPS, 1.00 IPC
[PROGRESS] 580M instructions, 980 KIPS, 1.00 IPC
[PROGRESS] 590M instructions, 992 KIPS, 1.00 IPC
[PROGRESS] 600M instructions, 976 KIPS, 1.00 IPC
[PROGRESS] 610M instructions, 981 KIPS, 1.00 IPC
[PROGRESS] 620M instructions, 996 KIPS, 1.00 IPC
[PROGRESS] 630M instructions, 978 KIPS, 1.00 IPC
[PROGRESS] 640M instructions, 984 KIPS, 1.00 IPC
[PROGRESS] 650M instructions, 1012 KIPS, 1.00 IPC
[PROGRESS] 660M instructions, 981 KIPS, 1.00 IPC
[PROGRESS] 670M instructions, 1010 KIPS, 1.00 IPC
[PROGRESS] 680M instructions, 1025 KIPS, 1.00 IPC
[PROGRESS] 690M instructions, 1080 KIPS, 1.00 IPC
[PROGRESS] 700M instructions, 1780 KIPS, 2.37 IPC
[PROGRESS] 710M instructions, 3115 KIPS, 8.00 IPC
[PROGRESS] 720M instructions, 2988 KIPS, 8.00 IPC
[PROGRESS] 730M instructions, 3121 KIPS, 8.00 IPC
[PROGRESS] 740M instructions, 3117 KIPS, 8.00 IPC
[PROGRESS] 750M instructions, 3039 KIPS, 8.00 IPC
[PROGRESS] 760M instructions, 2904 KIPS, 8.00 IPC
[PROGRESS] 770M instructions, 3055 KIPS, 8.00 IPC
[PROGRESS] 780M instructions, 3063 KIPS, 8.00 IPC
[PROGRESS] 790M instructions, 3000 KIPS, 8.00 IPC
[PROGRESS] 800M instructions, 2959 KIPS, 8.00 IPC
[PROGRESS] 810M instructions, 3202 KIPS, 8.00 IPC
[PROGRESS] 820M instructions, 3025 KIPS, 8.00 IPC
[PROGRESS] 830M instructions, 3157 KIPS, 8.00 IPC
[PROGRESS] 840M instructions, 2908 KIPS, 8.00 IPC
[PROGRESS] 850M instructions, 3122 KIPS, 8.00 IPC
[PROGRESS] 860M instructions, 3123 KIPS, 8.00 IPC

DOT_PRODUCT
  C++/OpenMP version

  A program which computes a vector dot product.

  Number of processors available = 8
  Number of threads =              8

  Sequential       500             500      1.19209e-06
  Parallel         500             500      8.82149e-06

  Sequential      2500            2500      5.24521e-06
  Parallel        2500            2500      1.90735e-06

  Sequential     12500           12500      2.57492e-05
  Parallel       12500           12500      4.05312e-06

  Sequential     62500           62500      0.000129223
  Parallel       62500           62500       1.4782e-05

  Sequential    312500          312500      0.000646353
  Parallel      312500          312500      6.74725e-05

  Sequential   1562500      1.5625e+06       0.00323081
  Parallel     1562500      1.5625e+06      0.000331879

  Sequential   7812500      7.8125e+06        0.0161536
  Parallel     7812500      7.8125e+06       0.00165343

  Sequential  39062500     3.90625e+07        0.0807681
  Parallel    39062500     3.90625e+07       0.00826263

DOT_PRODUCT
  Normal end of execution.
[SIFT_RECORDER:0:0] Recorded 676959455 instructions
[S[TRACE:0] -- DONE --
IFT_RECORDER:0:1] Recorded 27469336 instructions
[SIFT_RECORDER:0:2] Recorded 27468232 instructions
[SIFT_RECORDER:0:3] Recorded 27467189 instructions
[SIFT_RECORDER:0:4] Recorded 27467141 instructions
[SIFT_RECORDER:0:5] Recorded 27467142 instructions
[SIFT_RECORDER:0:6] Recorded 27467173 instructions
[SIFT_RECORDER:0:7] Recorded 27467132 instructions
[SNIPER] End
[SNIPER] Elapsed time: 690.12 seconds
Failed to generated sim.out: Invalid prefix roi-begin
kbtxwer commented 2 years ago

I opened wp/sim.stats.sqlite3 and r13/sim.stats.sqlite3, and compared each other and found that the table in wp/sim.stats.sqlite3 has 4 records, but the table in r13/sim.stats.sqlite3 only got 2. image image I think this is the main problem caused the exceptions above

kbtxwer commented 2 years ago

I rolled back pinpoint to version d0e2e27da9979dea5890226e8bf2f44036ab8d26 and now it seems work well. image

alenks commented 2 years ago

I opened wp/sim.stats.sqlite3 and r13/sim.stats.sqlite3, and compared each other and found that the table in wp/sim.stats.sqlite3 has 4 records, but the table in r13/sim.stats.sqlite3 only got 2. image image I think this is the main problem caused the exceptions above

Yes, this is what I meant when I mentioned that the LoopPoint region specifications are not triggered during simulation. I will look into what can cause such an issue with Sniper using SDE frontend.

alenks commented 2 years ago

I rolled back pinpoint to version d0e2e27da9979dea5890226e8bf2f44036ab8d26 and now it seems work well. image

This is the first public version of LoopPoint. If this works, I wonder why doesn't Sniper+SDE combination work. What machine are you running the docker instance on (assuming you run LoopPoint inside the docker instance)?

kbtxwer commented 2 years ago

This is the first public version of LoopPoint. If this works, I wonder why doesn't Sniper+SDE combination work. What machine are you running the docker instance on (assuming you run LoopPoint inside the docker instance)?

ThinkStation-P920 Intel® Xeon(R) Gold 6126 CPU @ 2.60GHz × 48 Ubuntu 20.04.3 LTS (64-bit)

alenks commented 2 years ago

I just finished running the latest version of LoopPoint again and am getting it to work correctly without doing anything different from the README. I can share the log file if required. Meanwhile, I am running the docker instance on a Skylake machine similar to yours running Ubuntu 16.04.4 LTS

Screenshot 2022-07-12 at 10 51 49 PM
abdelrahmanhussein commented 2 years ago

Hi @kbtxwer and @kbtxwer,

I am facing the same exact problem below. Would you please tell me the steps I should carry out to overcome this problem? I have not modified any file and I just cloned the LoopPoint repo today, July 18.

Thanks.

LOOPPOINT] Collecting results for dotproduct-omp.1 using test input class and passive OMP wait policy
[LOOPPOINT] Error: Unable to fetch results for r1.
[LOOPPOINT] Error: Simulation results not found for r1
[LOOPPOINT] Error: Unable to fetch results for r3.
[LOOPPOINT] Error: Simulation results not found for r3
[LOOPPOINT] Error: Unable to fetch results for r4.
[LOOPPOINT] Error: Simulation results not found for r4
[LOOPPOINT] Error: Unable to fetch results for r6.
[LOOPPOINT] Error: Simulation results not found for r6
[LOOPPOINT] Error: Unable to fetch results for r7.
[LOOPPOINT] Error: Simulation results not found for r7
[LOOPPOINT] Error: Unable to fetch results for r9.
[LOOPPOINT] Error: Simulation results not found for r9
[LOOPPOINT] Error: Unable to fetch results for r11.
[LOOPPOINT] Error: Simulation results not found for r11
[LOOPPOINT] Error: Unable to fetch results for r12.
[LOOPPOINT] Error: Simulation results not found for r12
[LOOPPOINT] Error: Unable to fetch results for r13.
[LOOPPOINT] Error: Simulation results not found for r13
[LOOPPOINT] Warning: Skipping r11 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r13 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r12 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r1 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r3 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r4 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r7 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r6 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r9 as the simulation results are not available
Traceback (most recent call last):
  File "./run-looppoint.py", line 642, in <module>
    run(args, update_config, res_tab)
  File "./run-looppoint.py", line 561, in run
    res_tab.append(evaluate(config))
  File "./run-looppoint.py", line 378, in evaluate
    extrapolated_runtime = extrapolated_runtime/coverage
ZeroDivisionError: float division by zero
alenks commented 2 years ago

@abdelrahmanhussein, it seems you are facing the same problem with Sniper not being able to trigger the PC-based region specification. Can you share more details as we cannot reproduce the issue from our side? Perhaps if you can compress and share the setup as a tarball (including one set of output directories), that would allow us to look into it.

lzto commented 1 year ago

Hi, I am having similar issue, fresh installation, do you happen to know how to solve this issue? Thanks

Pin tools switches

-h [default 0] Print help message (Return failure of PIN_Init() in order to allow the tool to print help message) -help [default 0] Print help message (Return failure of PIN_Init() in order to allow the tool to print help message)

alenks commented 1 year ago

@lzto This seems to be related to a recent check-in to the Sniper repo. We'll look into this to have a fix very soon.

lzto commented 1 year ago

looks like this knob is changed in https://github.com/snipersim/snipersim/commit/d427c8f339c9d22483de927e169be3c0ad6a28a9

changing -control to -pinplay:control solved the issue.

lzto commented 1 year ago

OK -- things are still not right -- Now I am getting the same error

[SIFT_RECORDER:0:12] Recorded 13734291 instructions
[SIFT_RECORDER:0:13] Recorded 13734273 instructions
[SIFT_RECORDER:0:14] Recorded 13734269 instructions
[SIFT_RECORDER:0:15] Recorded 13734295 instructions
[SNIPER] End
[SNIPER] Elapsed time: 252.69 seconds
[LOOPPOINT] Collecting results for dotproduct-omp.1 using test input class and passive OMP wait policy
[LOOPPOINT] Error: Unable to fetch results for r1.
[LOOPPOINT] Error: Simulation results not found for r1
[LOOPPOINT] Error: Unable to fetch results for r2.
[LOOPPOINT] Error: Simulation results not found for r2
[LOOPPOINT] Error: Unable to fetch results for r3.
[LOOPPOINT] Error: Simulation results not found for r3
[LOOPPOINT] Error: Unable to fetch results for r4.
[LOOPPOINT] Error: Simulation results not found for r4
[LOOPPOINT] Error: Unable to fetch results for r5.
[LOOPPOINT] Error: Simulation results not found for r5
[LOOPPOINT] Warning: Skipping r1 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r3 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r2 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r5 as the simulation results are not available
[LOOPPOINT] Warning: Skipping r4 as the simulation results are not available
Traceback (most recent call last):
  File "./run-looppoint.py", line 683, in <module>
    run(args, update_config, res_tab)
  File "./run-looppoint.py", line 591, in run
    res_tab.append(evaluate(config))
  File "./run-looppoint.py", line 382, in evaluate
    extrapolated_runtime = extrapolated_runtime/coverage
ZeroDivisionError: float division by zero
lzto commented 1 year ago

Looks like it need KASLR disabled to run correctly.

echo 0 |sudo tee /proc/sys/kernel/randomize_va_space

Another question to @alenks, what is the software license for looppoint? I saw readme file and other files contains different information. Can you please clarify. Thanks,

alenks commented 1 year ago

@lzto Yes, disabling ~K~ASLR is a workaround to get things working. But we're trying to get another solution to make it work so that it works even when ASLR is enabled (since this is the default case now).

Thanks for pointing out the ambiguity in the software license. When we released the tools initially, the licenses were different for a number of tools that we use. The licenses changed for some of the LoopPoint codes (the licenses are provided in the particular files), Sniper (Academic/MIT), Pin/SDE/PinPlay kits, etc. The driver scripts have an MIT license.

lzto commented 1 year ago

Thank you Alen. I am examining the output of looppoint and some value looks way off For example, the access latency(s) are negative in the simulation/*/sim.out file. Is this normal? Thanks,

DRAM summary                         |             |             |             |             |             |             |             |
  num dram accesses                  |    24149051 |           0 |           0 |           0 |    24148892 |           0 |           0 |           0
  average dram access latency (ns)   |  -285562.76 |         inf |         inf |         inf |   -34062.61 |         inf |         inf |         inf
  average dram queueing delay        |  -285616.19 |        0.00 |        0.00 |        0.00 |   -34116.04 |        0.00 |        0.00 |        0.00
  average dram bandwidth utilization |      34.00% |       0.00% |       0.00% |       0.00% |      34.00% |       0.00% |       0.00% |       0.00%
trevorcarlson commented 1 year ago

@lzto This could be due to how fast-forwarding is handled by the simulator. Note that these results are computed by the gen_simout.py script. We can look into the Sniper sim.stats* files (via dumpstats.py) to see the latency data. I suspect that gen_simout.py has a bug preventing it from accurately showing results during LoopPoint simulation.

alenks commented 1 year ago

Closing this issue as the approach to use image-name+offset instead of absolute PC solves the problem when ASLR is enabled. Please reopen if the issue persists on your machine.