-
Notifications
You must be signed in to change notification settings - Fork 99
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
WIP: HashmapAccumulator Example #299
WIP: HashmapAccumulator Example #299
Conversation
Initial commit of my stab at a hashmap accumulator example. This code won't compile b/c the compiler wants something else from my functor call, but I'm not quite sure what it is right now... do Kokkos parallel functors only work when called inside a class?
Currently this won't compile... just putting in the PR so it's accessible. |
Fixed the compile error and have the example running. It doesn't do anything useful but it runs.
Fixed the compile error and I have the example using the hashmap accumulator. The example doesn't do anything useful, but it runs. I've only tried running this on OpenMP so far. |
@srajama1 Here's the first cut of a simple example of the |
What do you mean it won't do anything useful so far ? Will it compute the distance-2 degree of a graph correctly ? |
@srajama1 No, not in this example... My understanding is that the basic HashmapAccumulator example you wanted was going to just demonstrate the use of it -- how to set up the external arrays and use it, not to use it for computing the tight bound on distance-2 degree. This code is just calling the function on a list of random numbers to exercise the use of HashmapAccumulator, so nothing terribly exciting. Since we had been discussing putting this example someplace that was not in perf_test/graph I did not think you were asking for a graph-based example. If you'd like, I can make an example that does the D2 Degree only as well. |
Yep, lets do that. |
The HashmapAccumulator file was a bit hard to read because of inconsistent use of indentions using mixed tabs and spaces in leading whitespace, etc. This applies only style fixes to remove tabs in leading whitespace and make some indention and spacing consistent across all of the methods.
I forgot to reset the Begins array in the example, which prevented users of the memory chunk after the first iteration from working properly. The example is fixed and doing what I'd expect it to do now.
Ok. |
It wasn't compiling on CUDA because I was sending the host view of the data to the functor in the parallel_for rather than the device copy on the mirror view. Added some new command line parameters: - verbose mode - number of values to put in the number list - etc. Also, I added a little cleanup and a couple of comments.
@ndellingwood Thanks for helping me find that static assert error I was getting on CUDA builds. It would have taken me a while to draw the connection between that error message and what was going on ;) |
The `example/` dir has not been set up to actually build any examples so I also added a Makefile in there and updated the generate_makefile script to add a new build target: `build-example` which will build the example directory contents. I also added an option to the generated makefile for `build-all` which will launch both `build-test` and `build-example` so we can choose if we want to build just examples or the tests or both.
@srajama1 |
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.
One small comment.. otherwise looks ok. Thanks for the example !
example/hashmap_accumulator/KokkosKernels_Example_HashmapAccumulator.cpp
Outdated
Show resolved
Hide resolved
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.
One small comment .. Looks good. Thanks for the example !
@william76 have you run a spot-check on this on White? Please post the results before we merge this in, thanks! |
@srajama1 I updated the contact information. |
I'm not sure if there's a specific tool for the spot check, but I ran the
Is this what you're looking for? |
Not exactly. Please use --spot-check script we use that tests for all warnings etc. This is to avoid any nightly failures before the merge (sort of like a manual PR testing). |
@srajama1 --spot-check fails, even for the current develop branch on white. @ndellingwood and I have been discussing this today and he got me set up with the Here's how I'm it on White (per @ndellingwood instructions):
Here's the first set of error messages I see in the output for the CUDA-OpenMP build (note: this is for develop, not the branch on my fork, but it has the same errors). These errors seem to get repeated a lot through out the build before it finally ends.
|
@william76 Yeah, those error messages are due to -Werror flag that needs to be removed for Cuda testing. |
@ndellingwood is there a way to remove that from the spot-check test? Will removing it affect nightly testing? |
@william76 I just merged PR #300 which updated some modules in the |
@ndellingwood Thanks! I just updated my develop branch and will run the spot-check on that, if it's good then I'll merge that into my HashmapAccumulator example branch and test. |
Those warnings should be fixed on the current develop branch of kokkos core. Merged that in earlier this week.
…Sent from my iPhone
On Oct 3, 2018, at 4:52 PM, William <notifications@github.com<mailto:notifications@github.com>> wrote:
@ndellingwood<https://github.com/ndellingwood> Thanks! I just updated my develop branch and will run the spot-check on that, if it's good then I'll merge that into my HashmapAccumulator example branch and test.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#299 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AJDQMZVGKMMduuON24Yiupmp5bI5Z0hvks5uhT-cgaJpZM4WzMD1>.
|
|
@ndellingwood : Any other concerns before merging this ? |
Running an extra spot-check on kokkos-dev to hit more compilers since this touches the build system. |
Rerunning the kokkos-dev check after fixing test_all_sandia. The tests I am running are on this PR with the develop branch merged in, and also manual removal of the coloring VBD and VBDBIT tests that are being addressed for Cuda in a separate PR. |
@ndellingwood Here's the spot-check output from my run on White:
|
Thanks Will! Merging in. |
Initial commit of my stab at a
HashmapAccumulator
example.This example is trying to implement a simplified version of how I'm using the
HashmapAccumulator
class in my Distance-2 Graph Coloring work in progress branch.