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

Edit ReadMe, Second Pass #9

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

christinerose
Copy link
Contributor

@christinerose christinerose commented Aug 8, 2022

Error, after running `hyperfine ‘dune exec src/fib.exe 40’

Warning: The first benchmarking run for this command was significantly slower than the rest (49.7 ms). 
This could be caused by (filesystem) caches that were not filled until after the first run. 
You should consider using the '--warmup' option to fill those caches before the actual benchmark. 
Alternatively, use the '--prepare' option to clear the caches before each timing run.

No indication with what to run –warmup, etc. Tried dune hyperfine opam ocaml … nothing. Nothing in my searches or Slack Overflow.

Learned it was a hyperfine command, so I tried hyperfine --warmup ‘dune exec …’ and got an error. It needed a number for the number of times to run (?), so I tried hyperfine --warmup 2 ‘dune exec …’ … and I got more errors:

Benchmark 1: dune exec ssrc/fib_domainslib.exe 2 42
Error: Command terminated with non-zero exit code: 1. Use the '-i'/'--ignore-failure'
 option if you want to ignore this. Alternatively, use the '--show-output' 
option to debug what went wrong.

“Observe that there is super-linear speedup going from the sequential version to
the two-core version! Why?”

This question isn’t answered.


In:

% hyperfine 'dune exec src/spectralnorm_par.exe 2 4096' 'dune exec src/spectralnorm_par.exe 4 4096' 
Benchmark 1: dune exec src/spectralnorm_par.exe 2 4096
  Time (mean ± σ):      1.169 s ±  0.053 s    [User: 2.201 s, System: 0.030 s]
  Range (min … max):    1.109 s …  1.294 s    10 runs
 
Benchmark 2: dune exec src/spectralnorm_par.exe 4 4096
  Time (mean ± σ):     702.3 ms ±  20.7 ms    [User: 2599.1 ms, System: 39.5 ms]
  Range (min … max):   674.0 ms … 741.4 ms    10 runs

The second Benchmark didn’t appear for me. Why?

I stopped at the Blocking Synchronisation Exercise. Picking up there next time.
@christinerose
Copy link
Contributor Author

This tutorial uses ocaml for the exercises, but the ocaml.org "Up and Running" uses utop, which is apparently easier. Are you using ocaml because it's not necessary to install anything else? Show we make note of UTop as well? .... or at least explain why we use the command ocaml ?

Copy link
Contributor

@Sudha247 Sudha247 left a comment

Choose a reason for hiding this comment

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

Thanks Christine! I've left some minor comments below.

The second Benchmark didn’t appear for me. Why?

Are you sure the command used to run this had both benchmarks on the same line?

Are you using ocaml because it's not necessary to install anything else? Show we make note of UTop as well? .... or at least explain why we use the command ocaml ?

utop is indeed easier to navigate compared with the ocaml toplevel, although I see them as interchangeable. If the reader wants, they should be able to use utop with the same examples.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
christinerose and others added 2 commits September 6, 2022 13:23
Co-authored-by: Sudha Parimala <sudharg247@gmail.com>
Co-authored-by: Sudha Parimala <sudharg247@gmail.com>
@christinerose
Copy link
Contributor Author

Are you sure the command used to run this had both benchmarks on the same line?

Ha! I'm not sure (I have no memory!). I'll go through it again and see.

@christinerose
Copy link
Contributor Author

I finally addressed those few suggestions/clarifications @Sudha247 left. I really need to go back through this step-by-step to see what I meant about the 2nd benchmark not showing up. Is this still the place to do this or will the OCaml 5 tutorials now be on OCaml.org?

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.

None yet

2 participants