-
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
Wiki examples: tests added #737
Conversation
Sorry for opening a second PR, the previous one was using my develop branch which I keep in sync with this repo to avoid conflict, etc... this new PR actually uses a feature branch. |
@lucbv : Can we add these to the tutorials directory as well ? |
@srajama1 sure, I did not realize we had a tutorial directory and I cannot find it in our source code, is it in a different repo? |
It is with Kokkos Tutorial |
If you want to add them to the turoial someone needs to write the slides for that. |
@@ -78,6 +78,7 @@ IF (KokkosKernels_INSTALL_TESTING) | |||
KOKKOSKERNELS_ADD_TEST_DIRECTORIES(test_common) | |||
KOKKOSKERNELS_ADD_TEST_DIRECTORIES(perf_test) | |||
KOKKOSKERNELS_ADD_TEST_DIRECTORIES(unit_test) | |||
KOKKOSKERNELS_ADD_EXAMPLE_DIRECTORIES(example) |
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.
When doing install testing we force testing on. Does it make sense to do the same for examples?
SET(KOKKOSKERNELS_ENABLE_EXAMPLES ON)
graph_type myGraph(entries, row_map); | ||
matrix_type myMatrix("test matrix", numRows, values, myGraph); | ||
} | ||
|
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.
The examples don't print anything at the end. Is there some performance stat or some sort of message that makes sense to print so the user knows the test is running successfully?
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.
It's a fair question, at the moment if an error happens during construction the test will fail, if it reaches completion is will return 0 which ctest interprets as success.
I can add screen output that states that the matrix constructor has been called successfully, I could do the same for the graph constructor actually.
@@ -188,7 +189,7 @@ ELSE() | |||
KOKKOSKERNELS_ADD_TEST_DIRECTORIES(test_common) | |||
KOKKOSKERNELS_ADD_TEST_DIRECTORIES(perf_test) | |||
KOKKOSKERNELS_ADD_TEST_DIRECTORIES(unit_test) | |||
#KOKKOSKERNELS_ADD_EXAMPLE_DIRECTORIES(example) | |||
KOKKOSKERNELS_ADD_EXAMPLE_DIRECTORIES(example) |
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 would squash the two commits.
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 figured I would get comments on the CMake side at least so I felt like squashing was going to be an inevitability before the PR merges ; )
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.
Spot check passes for me. Approve after squashing.
A couple of unrelated lines got changed (trailing spaces cleaned up). Not sure what we want the policy to be on this going forward?
@jjwilke the comment on whitespaces reminds me that I should probably run clang formatting on the two new examples. I am guilty of not doing it since I have not looked into integrating clang-format with emacs. I am guessing that there must be a script out there that modifies the formatting policy in emacs to use the local project clang format file? |
The added tests are fairly small and simple so it should be no problem to have them built and tested. Also adding CMake logic to actually enable the tests. Reformatting both example using clang-format
kokkos-dev: spot_check####################################################### kokkos-dev: spot_check_tpls####################################################### |
@ndellingwood if that's OK with you it seems that this can be merged. |
@srajama1 @brian-kelley |
@srajama1 @ndellingwood @jjwilke
Adding a couple of tests to make sure that the examples in the wiki are actually compiling and working correctly.
This includes two new test: wiki_crsmatrix and wiki_spmv as well as some CMake logic to get things compiled and tested.
See issue #735 for additional information.