Skip to content

Closes #4175: remove try! in toSymEntry - #4176

Merged
ajpotts merged 1 commit into
Bears-R-Us:masterfrom
ajpotts:4173_zeros_fails_when_max_bits_argument_is_used_pt1
Mar 18, 2025
Merged

ajpotts merged 1 commit into
Bears-R-Us:masterfrom
ajpotts:4173_zeros_fails_when_max_bits_argument_is_used_pt1

Conversation

@ajpotts

@ajpotts ajpotts commented Mar 12, 2025

Copy link
Copy Markdown
Contributor

Remove try! in toSymEntry because it kills the server instead of throwing an Error.

Closes #4175: remove try! in toSymEntry

@e-kayrakli

Copy link
Copy Markdown
Contributor

I really like this change coming. Though, I will keep a close eye on performance as making toSymEntry a throwing function could result in much more code to be generated and executed to be able to handle errors thrown.

github-merge-queue Bot pushed a commit that referenced this pull request Mar 17, 2025
This PR is to assist #4176.

That PR makes `toSymEntry` a throwing function. Unfortunately, in the
histogram code, there are some nested foralls which are subject to [an
existing bug in the Chapel
compiler](chapel-lang/chapel#26912) that gets
exposed by making `toSymEntry` a throwing function. This PR adjusts the
histogram code to avoid that bug.

In general, the change here shouldn't be seen as a workaround, although
the implementation could still be less than ideal. When you have nested
`forall`s, in almost all cases, the outer one will grab all the cores in
the system, forcing the inner one to be sequential one. Where this PR
makes changes, it feels way more important for the inner loop to execute
in parallel compared to the outer one. Therefore, I expect the change
here to be an improvement for performance as well.

Signed-off-by: Engin Kayraklioglu <[email protected]>
@ajpotts
ajpotts force-pushed the 4173_zeros_fails_when_max_bits_argument_is_used_pt1 branch from 3036e1e to 8e12b52 Compare March 17, 2025 17:45
@ajpotts
ajpotts marked this pull request as ready for review March 17, 2025 17:52
@ajpotts
ajpotts force-pushed the 4173_zeros_fails_when_max_bits_argument_is_used_pt1 branch from 8e12b52 to de19892 Compare March 17, 2025 18:03
@ajpotts
ajpotts added this pull request to the merge queue Mar 18, 2025
Merged via the queue into Bears-R-Us:master with commit bb600d0 Mar 18, 2025
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.

remove try! in toSymEntry

4 participants