-
Notifications
You must be signed in to change notification settings - Fork 12
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
Improve test coverage of CrsGraph and CrsMatrix #262
Conversation
Can one of the admins verify this patch? |
ok to test |
Is there an easy way of seeing the configure scripts for the Jenkins jobs? I found the CMakeCache.txt, but if there is a script, that would be easier (and maybe I am just missing something). |
@kruger yes, the scripts are in |
This PR addresses Issue #135 and some of the more detailed issues are there as well. |
Codecov Report
@@ Coverage Diff @@
## master #262 +/- ##
=========================================
Coverage ? 57.78%
=========================================
Files ? 49
Lines ? 16993
Branches ? 0
=========================================
Hits ? 9819
Misses ? 7174
Partials ? 0
Continue to review full report at Codecov.
|
The jenkins test result is similar to my own tests: |
@kruger Interesting, just realized that the single coverage post here is updated by the coverage. So, in fact, we have the coverage report from the latest build. |
@aprokop Interesting. Any idea of what the fortpetra.f90 is below 50%? If I read it correctly, it says that this branch improved things by 87%, but I can't see how to tell what's missing in coverage. |
Thanks! As a comment for future reference: I think the main thing for maps/matrix/graphs is more 2D decomposition (or perhaps, any 2D decomposition). I have a note in the helper functions about this probably being a good idea. If we create a second version of the helper routines with the 2D decomp and then program up the same type of tests, I think it would be easy to get most of the missing coverage. There are some miscellaneous helper routines and if/else branches that we are missing as well, but these are relatively minor. |
Agreed
Yes, Maps and MultiVectors would be of higher priority.
I don't understand what 2D you are talking about. I think for me 2D may mean something different. Can you please elaborate?
I have rebased the PR. Now I need to look through it, and see if everything looks OK. Once I've done that, I will merge it. |
Maybe I misunderstood the tpetra tutorial, but I thought if you specify just a row map for the matrix constructor, then you have just the row disributed where as if you specify both row and column, then you have both distributed. In any case, we need permutations on the constructors primarily if I am understanding how the swig wrappers work. |
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.
This is only a partial review, just saving my comments so far.
@kruger I rebased this PR on top of current master. Couple things that I had to fix were:
Please take a look, and I think it would be nice to do some more thorough testing in some functions. |
There is some problem in compilation with |
I wonder if it is some kind of race condition. You try to compile that source file multiple times in that directory. If different make threads will try to compile it simultaneously, it is possible that one of them is recompiling, while the second one is trying to use it. Something like this? |
4074b6c
to
c23b84f
Compare
We used to have that problem before (#94). One way to fix thatis is to add a dummy library for all |
c18f553
to
089e034
Compare
This increases the coverage of ForTrilinos and addresses primarily Issues trilinos#135 (CrsGraph), but also Issues trilinos#121 (MultiVector) and trilinos#120 (CrsMatrix) as well as improving coverage in tpetra and interface. The method is to create *Unit-style tests that are as small as possible while providing a thorough test. To that end, "helper files" (e.g., test_tpetra_crsgraph_helper.F90 or test_tpetra_crsmatrix_helper.F90) were created to provide standard matrices, graphs, maps, etc. for testing. The matrix helper file is also used by the interface routines to solve linear systems or find eigenvalues. Other development goals: - the pre-existing "fat tests" are maintained for useful examples - tests must run in serial or parallel from command-line (ctest only tests one or the other) - tests must be clean (no RCP errors) when running from command-line - methods for crsgraph and crsmatrix try to show when fillComplete is needed for a given call. Helper files do not fillComplete Miscellaneous documentation changes are also included, and build system changes were required. Co-authored-by: Andrey Prokopenko <[email protected]> Co-authored-by: Michel de Messiere <[email protected]> Co-authored-by: Jared Popelar <[email protected]>
Hmm, I've got 2 failure locally that I need to take a look at (at least, in Debug mode).
@kruger I have made some changes to the PR, and was not careful to stack them on top of your commit, instead amending it. I cannot force-push to the branch. Can you please add me as a collaborator for the TechX ForTrilinos fork? Please do that before you fix the |
089e034
to
f9e5f6a
Compare
OK, I pushed. Go ahead and fix the |
@aprokop I'm not seeing the multivector problem. I'm using |
I see things like this:
If I comment out any |
OK, the bug was found and fixed. Once jenkins passes, can squash merge. |
This goes through and increases coverage in CrsGraph and CrsMatrix.
Many of the methods are just testing that they run and not that they run
correctly because they use this idiom:
fresult = graph%getFoo(); TEST_IERR()
This probably needs improving.
gaussSeidel is an example of a test that needs further work.
Also, the skeleton for these tests was done awhile ago and the API has
changed. Coverage tests should be used to see what is missing once the
nightlies come through.