-
Notifications
You must be signed in to change notification settings - Fork 587
Remove warnings from Thyra and Stratimikos impacting CUDA #1140
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
Comments
CC: @trilinos/thyra, @trilinos/stratimikos I am getting to work on this now. |
This is just a few of the warnings reported in trilinos#1133, just the warnings reported by GCC 4.7.2. The rest will be take care of next.
…#1140) This breaks up the single configure script that Matt B. provided into its three logical parts.
I get link failures otherwise. Something seems to not be complete in the env otherwise.
This varible is used it is just that this version of nvcc does not realize that. This refactored version is actually less code and is just as clear.
…#1140) This breaks up the single configure script that Matt B. provided into its three logical parts.
I get link failures otherwise. Something seems to not be complete in the env otherwise.
This varible is used it is just that this version of nvcc does not realize that. This refactored version is actually less code and is just as clear.
Enabling tests with Thyra this gets rid of all of the Thyra warnings. Most of these warnings were 'statement is unreachable'. I used the new macro TEUCHOS_UNREACHABLE_RETURN(). There was one unused var warning in a test that was a real used var. It was good to see that and fix it.
NVCC thinks these vars are not needed but GCC disagrees. The build fails unless you put these back. Build/Test Cases Summary Enabled Packages: TeuchosCore, ThyraEpetraAdapters, ThyraEpetraExtAdapters, ThyraTpetraAdapters, ThyraCore Disabled Packages: PyTrilinos,Claps,TriKota Enabled all Forward Packages 0) MPI_RELEASE_DEBUG_SHARED_PT => passed: passed=2233,notpassed=0 (92.29 min) Other local commits for this build/test group: 4cc32a2, 2e6e050, c5bbe62, 1ce3bd0, 790f463, 39e315d
I was able to reproduce warnings for Thyra for the NVCC/CUDA build on shiller using the env provded in #1133. I extracted this into the scripts under Trilinos:
and used these to reproduce warnings in Thyra and fix them. See details below. I created the new macro Next I will remove all of the warnings for Stratimikos for NVCC/CUDA. DETAILED NOTES: (2017/03/16) @bathmath provided the pretty complete configure script above. It even has the module loads so it is self-contained. The only piece of info missing is what machine these builds are done on. My guess are the ATTB machines hansen and shiller. First, I need to separate this configure script into its three logical parts:
I broke up this script into the thre files:
I pushed this to the branch: as of commit 1b2f8ce. I then tried to reproduce the configure and build with:
That build failed with link failures like:
Seems like the build configuration is missing Now configuring and building from scratch:
Now that actually built and linked everything. Now running the tests:
Looks like you can't actually run tests that need CUDA on the build node. You get, for example:
So how to run test on shiller? Where do I find this documentation? I did a search on the snl-wiki for "shiller" and I found out where to find documentation on the machine itself. After grabing interactive nodes, I was able to run:
Wow, shiller is super slow! Anyhow, I can finally see the warnings that were produced when building Thyra and Stratimikos tests. Looking for unique warnings from Teuchos first:
I need to create a separate issue for that. Now to look at Thyra warnings:
Of these, almost all of them are "statement is unreachable" as shown by:
That leaves 35 "statement is unreachable" warnings. Many of these "statement is unreachable" warnings come from code like:
Grepping for that comment shows there 15 of these:
So that is where I will start. What I want to do here is to create a macro I removed all of the warnings for Thyra and pushed to the 'develop' branch. |
…os#1140) Should make this easier to find in Doxygen.
… avoid warnings (trilinos#1140) With NVCC, it issues a warning about the 'break' statement being unreachable (which it is).
These vars were only used in one unit test so I just moved them there to avoid the "unused var" warning with NVCC. But NVCC is just wrong that these vars are not used. If you comment them out, the code does not build with GCC 4.8.3.
…os#1140) Should make this easier to find in Doxygen.
… avoid warnings (trilinos#1140) With NVCC, it issues a warning about the 'break' statement being unreachable (which it is).
These vars were only used in one unit test so I just moved them there to avoid the "unused var" warning with NVCC. But NVCC is just wrong that these vars are not used. If you comment them out, the code does not build with GCC 4.8.3.
After talking with Roger P. I have changed this to only remove the return statement for __NVCC__. This is because only __NVCC__ warns about the unreachable return but having that return statement leads to safer code by avoiding undefined behavior in case a function is modified in such a way that this return is no longer unreachable. In that case, we want it to return something to avoid undefined behavior. I also improved the documentation some.
I finished cleaning up the warnings from Thyra and Stratimikos for NVCC and pushed to the Trilinos 'develop' branch (see below). @bathmatt, I am closing this as complete as I am pretty sure that you will not see any more warnings on NVCC on shiller coming from building Thyra or Stratimikos. There are also not any warnings for GCC 4.8.3 as well. DETAILED NOTES: (2017/03/17) I cleaned up all of the warnings for Stratimikos for NVCC and pushed to the branch 'thyra-stratimikos-cuda-warnings-1140'. Now I want to verify that all warnings for Thyra and Stratimikos are removed for the Trilinos build for Drekar. For that, on shiller, I do:
Wow, almost 7.5 hours to build these packages on 10 cores! That is fantastic! Looking for any remaining Thyra or Stratimikos warnings:
I could fix the ones in NOX but I think Roger is already taking care of those (see #1139). As for the warnings in Xpetra, those should be fixed by an Xpetra developer. Looking at the remaining warnings on this branch and the size of the make output:
Wow, still over 20K unique warnings! (2017/03/20) I then went back on crf450 and built and tested Teuchos, Thyra, and Stratimikos with GCC 4.8.3 with:
And this gave no warnings:
(2017/03/21) I pushed these commits to the Trilinos 'develop' branch with the top commit being:
|
This will take care of Thyra and Stratimikos warnings reported in #1133.
The text was updated successfully, but these errors were encountered: