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

Addition of nqueens benchmark to multicore-numerical #173

Closed
wants to merge 3 commits into from

Conversation

ctk21
Copy link
Member

@ctk21 ctk21 commented Sep 17, 2020

This PR adds the (classical) nqueens benchmark to sandmark where the number of 'valid' configurations for n queens on a chessboard of size n is calculated.

We add both a single core and multicore version that uses tasks in a similar manner to how the Cilk nqueens benchmark.

@ctk21
Copy link
Member Author

ctk21 commented Sep 17, 2020

This PR currently has a problem that needs sorting out. If I run the multicore variant with Domainslib 0.2.2 then I'm getting a stack overflow:

for i in {4..14}; do ./nqueens_multicore.exe 4 $i ; done
2 solutions for board of size 4
10 solutions for board of size 5
4 solutions for board of size 6
40 solutions for board of size 7
92 solutions for board of size 8
352 solutions for board of size 9
724 solutions for board of size 10
2680 solutions for board of size 11
Fatal error: exception Stack_overflow
Fatal error: exception Stack_overflow
Fatal error: exception Stack_overflow

@Sudha247
Copy link
Contributor

Running this benchmark on domainslib 0.3.0 does not produce a stack overflow anymore. I think switching to Multi_channel for storing async tasks eliminated the stack overflow. I suggest we merge this PR now as is, possibly after a rebase to master.

@ctk21 ctk21 force-pushed the add_nqueens_multicore branch 2 times, most recently from 36f623d to 1925905 Compare September 16, 2021 14:05
@ctk21
Copy link
Member Author

ctk21 commented Sep 16, 2021

Now rebased and with a run config file.
We need #253 to get things building for the parallel benchmarks.

@ctk21
Copy link
Member Author

ctk21 commented Sep 17, 2021

rebased now that #253 is merged. This one should now be good to merge.

@ctk21 ctk21 marked this pull request as ready for review September 17, 2021 09:10
@kayceesrk
Copy link
Contributor

@Sudha247 Sudha247 added the good first issue Good for newcomers label Mar 31, 2022
@Sudha247 Sudha247 mentioned this pull request Apr 6, 2022
@Sudha247
Copy link
Contributor

Closing this as it was merged in #329. Thanks for the benchmark @ctk21!

@Sudha247 Sudha247 closed this Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants