-
Notifications
You must be signed in to change notification settings - Fork 2k
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
evaluate2.sh: Add Time Limit for Runs #293
evaluate2.sh: Add Time Limit for Runs #293
Conversation
else | ||
hyperfine $HYPERFINE_OPTS "./calculate_average_$fork.sh 2>&1" | ||
numactl --physcpubind=0-7 hyperfine $HYPERFINE_OPTS "timeout -v $RUN_TIME_LIMIT ./calculate_average_$fork.sh 2>&1" | ||
else # MacOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, very nice. So evaluate2.sh
runs on MacOS too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I've been testing on both Fedora Linux and my MacBook M2 Air
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to check whether gtimeout
command is available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have timeout
rather than gtimeout
on MacOS. Should we just use that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL, nevermind, wrong console ;)
It is checked already, so LGTM. Will merge. Will only add log message for this case.
Since this has not been merged yet, I added a check that |
Nice; just ran into that too. |
numactl --physcpubind=0-7 hyperfine $HYPERFINE_OPTS "./calculate_average_$fork.sh 2>&1" | ||
else | ||
hyperfine $HYPERFINE_OPTS "./calculate_average_$fork.sh 2>&1" | ||
numactl --physcpubind=0-7 hyperfine $HYPERFINE_OPTS "timeout -v $RUN_TIME_LIMIT ./calculate_average_$fork.sh 2>&1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get
timeout: invalid option -- 'v'
Try 'timeout --help' for more information.
It works without -v
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I have outdated version, I see -v here https://man7.org/linux/man-pages/man1/timeout.1.html
* evaluate2.sh: Add Time Limit for Runs * check that bc is installed --------- Co-authored-by: Jason Nochlin <[email protected]>
Followup to #290
This is the approach recommended by hyperfine's maintainer: sharkdp/hyperfine#576