Skip to content

Added run_HeCBench.sh to aomp/bin. - #2396

Merged
Lynd98 merged 8 commits into
aomp-devfrom
runHeCBench
Aug 20, 2026
Merged

Added run_HeCBench.sh to aomp/bin.#2396
Lynd98 merged 8 commits into
aomp-devfrom
runHeCBench

Conversation

@Lynd98

@Lynd98 Lynd98 commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Allow developers to easily run HeCBench (a suite of benchmarks) with hip and aomp. They can run individual
benchmarks with run_HeCBench.sh.

Technical Details

Added run_HeCBench.sh

Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh Outdated

@mhalk mhalk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Generally: make sure this script is shellcheck-compliant.
IMHO the VERBOSE-handling makes the script much harder to read and constantly "breaks the flow".

Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh
Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh Outdated
@Lynd98
Lynd98 requested review from jplehr and mhalk August 5, 2026 19:46
Comment thread bin/run_HeCBench.sh Outdated
_AOMP_USER_SET=0
_ROCM_USER_SET=0
[ -n "${AOMP+x}" ] && _AOMP_USER_SET=1
[ -n "${ROCM+x}" ] && _ROCM_USER_SET=1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh Outdated
@Lynd98
Lynd98 requested review from jplehr and mhalk August 11, 2026 16:51
Comment thread bin/run_HeCBench.sh
Comment on lines +158 to +168
if timeout "$HECBENCH_TIMEOUT" "${make_run[@]}" >>"$results" 2>&1; then
rc=0
else
rc=$?
fi
if [ $rc -eq 0 ]; then
echo "STATUS $d: PASS" | tee -a "$results"
"${make_clean[@]}" >/dev/null 2>&1
else
echo "STATUS $d: FAIL(rc=$rc)" | tee -a "$results"
fi

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What's the reason that lines 164,165 are not folded into the if block in 159?
Same question for the else block in 167.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice!

Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh Outdated
Comment on lines +158 to +162
if timeout "$HECBENCH_TIMEOUT" "${make_run[@]}" >>"$results" 2>&1; then
rc=0
else
rc=$?
fi

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What's the reason we cannot use $? directly for a successful run?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The variable rc was not needed. We need to be careful with $?, since it changes with each invocation of a Linux utility.

@Lynd98
Lynd98 requested review from jplehr and mhalk August 12, 2026 16:36

@mhalk mhalk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Did a thorough pass -- most of these are mere suggestions to improve style and readability.
Basically NFCI comments :)

Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh
Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh
Comment on lines +158 to +168
if timeout "$HECBENCH_TIMEOUT" "${make_run[@]}" >>"$results" 2>&1; then
rc=0
else
rc=$?
fi
if [ $rc -eq 0 ]; then
echo "STATUS $d: PASS" | tee -a "$results"
"${make_clean[@]}" >/dev/null 2>&1
else
echo "STATUS $d: FAIL(rc=$rc)" | tee -a "$results"
fi

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice!

Comment thread bin/run_HeCBench.sh Outdated
@Lynd98
Lynd98 requested a review from mhalk August 19, 2026 18:52

@mhalk mhalk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! I think this is a solid base -- Thank you Lynd!
(Added another suggestion I simply forgot to send during the previous review.)

Comment thread bin/run_HeCBench.sh Outdated
Comment thread bin/run_HeCBench.sh
Comment thread bin/run_HeCBench.sh Outdated
@Lynd98
Lynd98 requested a review from mhalk August 20, 2026 17:09

@jplehr jplehr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks!

@Lynd98
Lynd98 merged commit cceb9f1 into aomp-dev Aug 20, 2026
1 check passed
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.

3 participants