-
Notifications
You must be signed in to change notification settings - Fork 2
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
#205: Belos: clean MINRES Tpetra test_minres_diag test #206
#205: Belos: clean MINRES Tpetra test_minres_diag test #206
Conversation
⚡ Code quality check ⚡ 🔴 clang-tidy found 89 issues! Click here to see details.Trilinos/packages/belos/tpetra/test/MINRES/test_minres_hb.cpp Lines 132 to 137 in 30a1938
!Line: 132 - warning: variable 'B' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_hb.cpp Lines 132 to 137 in 30a1938
!Line: 132 - warning: variable name 'B' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 64 to 69 in 30a1938
!Line: 64 - warning: declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 65 to 70 in 30a1938
!Line: 65 - warning: declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 70 to 75 in 30a1938
!Line: 70 - warning: class 'VectorOperator' defines a non-default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 70 to 75 in 30a1938
!Line: 70 - warning: declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 74 to 79 in 30a1938
!Line: 74 - warning: use '= default' to define a trivial destructor [hicpp-use-equals-default,modernize-use-equals-default] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 85 to 90 in 30a1938
!Line: 85 - warning: all parameters should be named in a function [hicpp-named-parameter,readability-named-parameter] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 86 to 91 in 30a1938
!Line: 86 - warning: operator=() does not handle self-assignment properly [cert-oop54-cpp] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 86 to 91 in 30a1938
!Line: 86 - warning: use a trailing return type for this function [modernize-use-trailing-return-type] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 86 to 91 in 30a1938
!Line: 86 - warning: all parameters should be named in a function [hicpp-named-parameter,readability-named-parameter] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 92 to 97 in 30a1938
!Line: 92 - warning: class 'DiagonalOperator' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 92 to 97 in 30a1938
!Line: 92 - warning: declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 96 to 101 in 30a1938
!Line: 96 - warning: use '= default' to define a trivial destructor [hicpp-use-equals-default,modernize-use-equals-default] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 98 to 103 in 30a1938
!Line: 98 - warning: overloading 'operator()' is disallowed [fuchsia-overloaded-operator] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 98 to 103 in 30a1938
!Line: 98 - warning: parameter name 'x' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 98 to 103 in 30a1938
!Line: 98 - warning: parameter name 'y' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 107 to 112 in 30a1938
!Line: 107 - warning: class 'DiagonalOperator2' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 107 to 112 in 30a1938
!Line: 107 - warning: declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 109 to 114 in 30a1938
!Line: 109 - warning: 2 adjacent parameters of 'DiagonalOperator2<ST, MV>' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters]
!Line: 109 - note: the first parameter in the range is 'n_in'
!Line: 109 - note: the last parameter in the range is 'min_gid_in' Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 112 to 117 in 30a1938
!Line: 112 - warning: use '= default' to define a trivial destructor [hicpp-use-equals-default,modernize-use-equals-default] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 114 to 119 in 30a1938
!Line: 114 - warning: overloading 'operator()' is disallowed [fuchsia-overloaded-operator] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 114 to 119 in 30a1938
!Line: 114 - warning: parameter name 'x' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 114 to 119 in 30a1938
!Line: 114 - warning: parameter name 'y' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 119 to 124 in 30a1938
!Line: 119 - warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 133 to 138 in 30a1938
!Line: 133 - warning: class 'ComposedOperator' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 133 to 138 in 30a1938
!Line: 133 - warning: declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 137 to 142 in 30a1938
!Line: 137 - warning: use '= default' to define a trivial destructor [hicpp-use-equals-default,modernize-use-equals-default] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 147 to 152 in 30a1938
!Line: 147 - warning: declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 147 to 152 in 30a1938
!Line: 147 - warning: 2 adjacent parameters of 'ComposedOperator<MV>' of similar type ('const RCP<VectorOperator<MV>> &') are easily swapped by mistake [bugprone-easily-swappable-parameters]
!Line: 147 - note: the first parameter in the range is 'pA_in'
!Line: 148 - note: the last parameter in the range is 'pB_in' Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 152 to 157 in 30a1938
!Line: 152 - warning: declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 152 to 157 in 30a1938
!Line: 152 - warning: parameter name 'x' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 152 to 157 in 30a1938
!Line: 152 - warning: parameter name 'y' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 161 to 166 in 30a1938
!Line: 161 - warning: class 'TrilinosInterface' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 161 to 166 in 30a1938
!Line: 161 - warning: declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 167 to 172 in 30a1938
!Line: 167 - warning: default arguments on virtual or override methods are prohibited [google-default-arguments] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 167 to 172 in 30a1938
!Line: 167 - warning: parameter name 'X' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 167 to 172 in 30a1938
!Line: 167 - warning: parameter name 'Y' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 167 to 172 in 30a1938
!Line: 167 - warning: declaring a parameter with a default argument is disallowed [fuchsia-default-arguments-declarations] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 167 to 172 in 30a1938
!Line: 167 - warning: declaring a parameter with a default argument is disallowed [fuchsia-default-arguments-declarations] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 170 to 175 in 30a1938
!Line: 170 - warning: use '= default' to define a trivial destructor [hicpp-use-equals-default,modernize-use-equals-default] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 174 to 179 in 30a1938
!Line: 174 - warning: use a trailing return type for this function [modernize-use-trailing-return-type] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 175 to 180 in 30a1938
!Line: 175 - warning: use a trailing return type for this function [modernize-use-trailing-return-type] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 186 to 191 in 30a1938
!Line: 186 - warning: default arguments on virtual or override methods are prohibited [google-default-arguments] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 186 to 191 in 30a1938
!Line: 186 - warning: declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 186 to 191 in 30a1938
!Line: 186 - warning: parameter name 'X' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 186 to 191 in 30a1938
!Line: 186 - warning: parameter name 'Y' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 186 to 191 in 30a1938
!Line: 186 - warning: parameter 'mode' is unused [misc-unused-parameters] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 186 to 191 in 30a1938
!Line: 186 - warning: 2 adjacent parameters of 'apply' of similar type ('ST') are easily swapped by mistake [bugprone-easily-swappable-parameters]
!Line: 186 - note: the first parameter in the range is 'alpha'
!Line: 186 - note: the last parameter in the range is 'beta' Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 186 to 191 in 30a1938
!Line: 186 - warning: parameter 'alpha' is unused [misc-unused-parameters] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 186 to 191 in 30a1938
!Line: 186 - warning: parameter 'beta' is unused [misc-unused-parameters] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 193 to 198 in 30a1938
!Line: 193 - warning: class 'IterativeInverseOperator' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 193 to 198 in 30a1938
!Line: 193 - warning: declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 198 to 203 in 30a1938
!Line: 198 - warning: use '= default' to define a trivial destructor [hicpp-use-equals-default,modernize-use-equals-default] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 218 to 223 in 30a1938
!Line: 218 - warning: declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 218 to 223 in 30a1938
!Line: 218 - warning: 2 adjacent parameters of 'IterativeInverseOperator<OP, ST, MP, MV>' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters]
!Line: 218 - note: the first parameter in the range is 'n_in'
!Line: 218 - note: the last parameter in the range is 'blocksize' Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 218 to 223 in 30a1938
!Line: 218 - warning: parameter 'blocksize' is unused [misc-unused-parameters] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 224 to 229 in 30a1938
!Line: 224 - warning: calling a function that uses a default argument is disallowed [fuchsia-default-arguments-calls] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 233 to 238 in 30a1938
!Line: 233 - warning: 'pProb' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 251 to 256 in 30a1938
!Line: 251 - warning: declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 251 to 256 in 30a1938
!Line: 251 - warning: parameter name 'b' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 251 to 256 in 30a1938
!Line: 251 - warning: parameter name 'x' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 269 to 274 in 30a1938
!Line: 269 - warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 309 to 314 in 30a1938
!Line: 309 - warning: variable 'D2' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 309 to 314 in 30a1938
!Line: 309 - warning: variable name 'D2' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 310 to 315 in 30a1938
!Line: 310 - warning: variable 'A2' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 310 to 315 in 30a1938
!Line: 310 - warning: variable name 'A2' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 321 to 326 in 30a1938
!Line: 321 - warning: variable 'D' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 321 to 326 in 30a1938
!Line: 321 - warning: variable name 'D' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 322 to 327 in 30a1938
!Line: 322 - warning: variable 'Inner' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 326 to 331 in 30a1938
!Line: 326 - warning: variable 'B' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 326 to 331 in 30a1938
!Line: 326 - warning: variable name 'B' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 327 to 332 in 30a1938
!Line: 327 - warning: variable 'C' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 327 to 332 in 30a1938
!Line: 327 - warning: variable name 'C' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 330 to 335 in 30a1938
!Line: 330 - warning: variable 'Outer' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 377 to 380 in 30a1938
!Line: 377 - warning: declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_diag.cpp Lines 377 to 380 in 30a1938
!Line: 377 - warning: use a trailing return type for this function [modernize-use-trailing-return-type] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_indefinite.cpp Lines 146 to 151 in 30a1938
!Line: 146 - warning: variable 'X_exact' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_indefinite.cpp Lines 150 to 155 in 30a1938
!Line: 150 - warning: variable 'B' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_indefinite.cpp Lines 150 to 155 in 30a1938
!Line: 150 - warning: variable name 'B' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_indefinite.cpp Lines 154 to 159 in 30a1938
!Line: 154 - warning: variable 'X' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_indefinite.cpp Lines 154 to 159 in 30a1938
!Line: 154 - warning: variable name 'X' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_indefinite.cpp Lines 257 to 262 in 30a1938
!Line: 257 - warning: variable 'actualResids' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_indefinite.cpp Lines 258 to 263 in 30a1938
!Line: 258 - warning: variable 'rhsNorm' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/belos/tpetra/test/MINRES/test_minres_indefinite.cpp Lines 259 to 264 in 30a1938
!Line: 259 - warning: variable 'resid' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/belos/tpetra/test/MINRES/test_pminres_hb.cpp Lines 130 to 135 in 30a1938
!Line: 130 - warning: variable 'X' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/belos/tpetra/test/MINRES/test_pminres_hb.cpp Lines 130 to 135 in 30a1938
!Line: 130 - warning: variable name 'X' is too short, expected at least 3 characters [readability-identifier-length] Trilinos/packages/belos/tpetra/test/MINRES/test_pminres_hb.cpp Lines 216 to 221 in 30a1938
!Line: 216 - warning: variable 'actualResids' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/belos/tpetra/test/MINRES/test_pminres_hb.cpp Lines 217 to 222 in 30a1938
!Line: 217 - warning: variable 'rhsNorm' is not initialized [cppcoreguidelines-init-variables] |
1b8a045
to
faf0709
Compare
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.
LGTM
Fixes #205
PR to Trilinos: trilinos#12322 (including #70, #177, #206)
This solves also other problems related to the
test_minres_diag
Tpetra testThis PR comes in addition to #70 and #177 to include the Belos Tpetra MINRES tests into Trilinos.
This PR provides the following to the
test_minres_diag
Tpetra test in Belos:double
typeTeuchos::reduceAll
istead of MPI one (MPI_REDUCE_ALL)