Skip to content
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

#208: ShyLU: Add Tpetra tests #209

Draft
wants to merge 3 commits into
base: NGA-FY23-develop
Choose a base branch
from

Conversation

cwschilly
Copy link
Collaborator

@cwschilly cwschilly commented Sep 21, 2023

Fixes #208

Creates the following tests:

  • shylu_factor_test_tpetra.cpp
  • shylu_belos_driver_tpetra.cpp

@cwschilly cwschilly linked an issue Sep 21, 2023 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Sep 22, 2023

⚡ Code quality check ⚡

🔴 cppcheck found 29 issues! Click here to see details.

#include "Teuchos_RCP.hpp"
#include "Teuchos_GlobalMPISession.hpp"
#include "Teuchos_XMLParameterListHelpers.hpp"
// MueLu
#include <MueLu_TpetraOperator.hpp>

!Line: 24 - information: Include file: "Teuchos_RCP.hpp" not found. [missingInclude]

#include "Teuchos_GlobalMPISession.hpp"
#include "Teuchos_XMLParameterListHelpers.hpp"
// MueLu
#include <MueLu_TpetraOperator.hpp>
#include <MueLu_CreateTpetraPreconditioner.hpp>

!Line: 25 - information: Include file: "Teuchos_GlobalMPISession.hpp" not found. [missingInclude]

#include "Teuchos_XMLParameterListHelpers.hpp"
// MueLu
#include <MueLu_TpetraOperator.hpp>
#include <MueLu_CreateTpetraPreconditioner.hpp>

!Line: 26 - information: Include file: "Teuchos_XMLParameterListHelpers.hpp" not found. [missingInclude]

#include "shylu.h"
#include "shylu_util.h"
#include "ShyLU_DDCore_config.h"
#include "shylu_partition_interface.hpp"
#include "shylu_directsolver_interface.hpp"

!Line: 37 - information: Include file: "shylu.h" not found. [missingInclude]

#include "shylu_util.h"
#include "ShyLU_DDCore_config.h"
#include "shylu_partition_interface.hpp"
#include "shylu_directsolver_interface.hpp"

!Line: 38 - information: Include file: "shylu_util.h" not found. [missingInclude]

#include "ShyLU_DDCore_config.h"
#include "shylu_partition_interface.hpp"
#include "shylu_directsolver_interface.hpp"
// Will likely have to move somewhere

!Line: 39 - information: Include file: "ShyLU_DDCore_config.h" not found. [missingInclude]

#include "shylu_partition_interface.hpp"
#include "shylu_directsolver_interface.hpp"
// Will likely have to move somewhere
int InitMatValues( const tcrsmatrix_t& newA, tcrsmatrix_t* A );

!Line: 40 - information: Include file: "shylu_partition_interface.hpp" not found. [missingInclude]

#include "shylu_directsolver_interface.hpp"
// Will likely have to move somewhere
int InitMatValues( const tcrsmatrix_t& newA, tcrsmatrix_t* A );
int InitMVValues( const MV& newb, MV* b );

!Line: 41 - information: Include file: "shylu_directsolver_interface.hpp" not found. [missingInclude]

delete prec;
}
delete newX;
delete newB;
delete A;
delete partitioner;

!Line: 459 - error: Found an exit path from function with non-void return type that has missing return statement [missingReturn]

const tvector_t *tempnewvec;
tvector_t *tempvec = 0;
for (int i=0; i<numVecs; ++i) {
tempnewvec = newb(i);
tempvec = (*b)(i);

!Line: 500 - style: The scope of the variable 'tempnewvec' can be reduced. [variableScope]

tvector_t *tempvec = 0;
for (int i=0; i<numVecs; ++i) {
tempnewvec = newb(i);
tempvec = (*b)(i);
for (int j=0; j<length; ++j)

!Line: 501 - style: The scope of the variable 'tempvec' can be reduced. [variableScope]

success = false;
return -1;
}
// Create an iterative solver manager.
RCP< Belos::SolverManager<double,MV,OP> > solver

!Line: 296 - style: Variable 'success' is assigned a value that is never used. [unreadVariable]

tvector_t *tempvec = 0;
for (int i=0; i<numVecs; ++i) {
tempnewvec = newb(i);
tempvec = (*b)(i);
for (int j=0; j<length; ++j)

!Line: 501 - style: Variable 'tempvec' is assigned a value that is never used. [unreadVariable]

#include "Isorropia_config.h" // Just for HAVE_MPI
#include <Ifpack2_Partitioner.hpp>
// Tpetra includes
#include <Tpetra_Core.hpp>

!Line: 16 - information: Include file: "Isorropia_config.h" not found. [missingInclude]

#include "Teuchos_GlobalMPISession.hpp"
#include "Teuchos_XMLParameterListHelpers.hpp"
// Amesos2 includes
#include <Amesos2.hpp>

!Line: 28 - information: Include file: "Teuchos_GlobalMPISession.hpp" not found. [missingInclude]

#include "Teuchos_XMLParameterListHelpers.hpp"
// Amesos2 includes
#include <Amesos2.hpp>
// MueLu includes

!Line: 29 - information: Include file: "Teuchos_XMLParameterListHelpers.hpp" not found. [missingInclude]

#include "shylu.h"
#include "shylu_util.h"
#include "ShyLU_DDCore_config.h"
#include "shylu_partition_interface.hpp"
#include "shylu_directsolver_interface.hpp"

!Line: 37 - information: Include file: "shylu.h" not found. [missingInclude]

#include "shylu_util.h"
#include "ShyLU_DDCore_config.h"
#include "shylu_partition_interface.hpp"
#include "shylu_directsolver_interface.hpp"

!Line: 38 - information: Include file: "shylu_util.h" not found. [missingInclude]

#include "ShyLU_DDCore_config.h"
#include "shylu_partition_interface.hpp"
#include "shylu_directsolver_interface.hpp"
using namespace std;

!Line: 39 - information: Include file: "ShyLU_DDCore_config.h" not found. [missingInclude]

#include "shylu_partition_interface.hpp"
#include "shylu_directsolver_interface.hpp"
using namespace std;

!Line: 40 - information: Include file: "shylu_partition_interface.hpp" not found. [missingInclude]

#include "shylu_directsolver_interface.hpp"
using namespace std;
template <typename ScalarType>

!Line: 41 - information: Include file: "shylu_directsolver_interface.hpp" not found. [missingInclude]

#include "Isorropia_config.h" // Just for HAVE_MPI
// #include "Epetra_LinearProblem.h"
// Tpetra includes
#include <Tpetra_Core.hpp>

!Line: 17 - information: Include file: "Isorropia_config.h" not found. [missingInclude]

#include "Teuchos_GlobalMPISession.hpp"
#include "Teuchos_XMLParameterListHelpers.hpp"
#include "Teuchos_RCP.hpp"
#include "shylu.h"
#include "shylu_util.h"

!Line: 29 - information: Include file: "Teuchos_GlobalMPISession.hpp" not found. [missingInclude]

#include "Teuchos_XMLParameterListHelpers.hpp"
#include "Teuchos_RCP.hpp"
#include "shylu.h"
#include "shylu_util.h"

!Line: 30 - information: Include file: "Teuchos_XMLParameterListHelpers.hpp" not found. [missingInclude]

#include "Teuchos_RCP.hpp"
#include "shylu.h"
#include "shylu_util.h"
using namespace std;

!Line: 31 - information: Include file: "Teuchos_RCP.hpp" not found. [missingInclude]

#include "shylu.h"
#include "shylu_util.h"
using namespace std;

!Line: 33 - information: Include file: "shylu.h" not found. [missingInclude]

#include "shylu_util.h"
using namespace std;
template <typename ScalarType>

!Line: 34 - information: Include file: "shylu_util.h" not found. [missingInclude]

string pass = "End Result: TEST PASSED";
string fail = "End Result: TEST FAILED";
int myPID = Comm->getRank();
if(myPID == 0)

!Line: 63 - style: The scope of the variable 'pass' can be reduced. [variableScope]

string fail = "End Result: TEST FAILED";
int myPID = Comm->getRank();
if(myPID == 0)
{

!Line: 64 - style: The scope of the variable 'fail' can be reduced. [variableScope]


@cwschilly
Copy link
Collaborator Author

I am having difficulty configuring Trilinos to actually build the shylu_dd/core directory so that I can build/test these tests. I'll leave this PR as is for now

@JacobDomagala
Copy link
Collaborator

JacobDomagala commented Sep 28, 2023

Add:

-D Trilinos_ENABLE_Zoltan2=OFF \      
-D Trilinos_ENABLE_Zoltan2Core=ON \

Should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ShyLU: Add Tpetra tests
3 participants