Skip to content

Commit

Permalink
Merge Pull Request #12557 from trilinos/Trilinos/master_merge_2023112…
Browse files Browse the repository at this point in the history
…4_175829

Automatically Merged using Trilinos Master Merge AutoTester
PR Title: b'Trilinos Master Merge PR Generator: Auto PR created to promote from master_merge_20231124_175829 branch to master'
PR Author: trilinos-autotester
  • Loading branch information
trilinos-autotester authored Nov 26, 2023
2 parents aafd520 + fa4d1f8 commit 6779ba1
Show file tree
Hide file tree
Showing 1,303 changed files with 68,237 additions and 38,749 deletions.
35 changes: 35 additions & 0 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ Belos
- Improved testing with Tpetra


Domi

- Package has been deprecated and removed from Trilinos


FEI

- Package has been deprecated and removed from Trilinos


Ifpack2

- 4th kind Chebyshev smoother
Expand All @@ -73,6 +83,16 @@ Ifpack2
- Patch solver with data compression


Komplex

- Package has been deprecated and removed from Trilinos


Moertel

- Package has been deprecated and removed from Trilinos


MueLu

- Better ML/MueLu compatibility (parameter translation, aggregation
Expand All @@ -91,6 +111,16 @@ NOX
Tempus transient problem (Tpetra version)


Pike

- Package has been deprecated and removed from Trilinos


Rythmos

- Package has been deprecated and removed from Trilinos


ShyLU

- FastILU algorithmic improvements and testing, new block version
Expand All @@ -111,6 +141,11 @@ Teko
- Epetra dependency is now optional


TriKota

- Package has been deprecated and removed from Trilinos


###############################################################################
# #
# Trilinos Release 14.2 Release Notes #
Expand Down
8 changes: 4 additions & 4 deletions Version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@
# for release mode and set the version.
#

SET(Trilinos_VERSION 14.5)
SET(Trilinos_MAJOR_VERSION 14)
SET(Trilinos_MAJOR_MINOR_VERSION 140500)
SET(Trilinos_VERSION_STRING "14.5 (Dev)")
SET(Trilinos_VERSION 15.1)
SET(Trilinos_MAJOR_VERSION 15)
SET(Trilinos_MAJOR_MINOR_VERSION 150100)
SET(Trilinos_VERSION_STRING "15.1 (Dev)")
SET(Trilinos_ENABLE_DEVELOPMENT_MODE_DEFAULT ON) # Change to 'OFF' for a release

# Used by testing scripts and should not be used elsewhere
Expand Down
52 changes: 28 additions & 24 deletions packages/belos/tpetra/test/BlockCG/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,64 +12,68 @@ TRIBITS_ADD_EXECUTABLE_AND_TEST(
TRIBITS_ADD_EXECUTABLE_AND_TEST(
Tpetra_BlockCG_hb_test
SOURCES test_bl_cg_hb.cpp
ARGS "--verbose"
COMM serial mpi
)
ARGS
"--verbose"
STANDARD_PASS_OUTPUT
)

TRIBITS_ADD_EXECUTABLE_AND_TEST(
Tpetra_PseudoBlockCG_hb_test
SOURCES test_pseudo_bl_cg_hb.cpp
ARGS "--verbose"
COMM serial mpi
)
)

TRIBITS_ADD_EXECUTABLE_AND_TEST(
Tpetra_PseudoBlockStochasticCG_hb_test
SOURCES test_pseudo_stochastic_cg_hb.cpp
ARGS
COMM serial mpi
)
)

ASSERT_DEFINED(${PACKAGE_NAME}_ENABLE_Triutils)
ASSERT_DEFINED(Tpetra_INST_COMPLEX_DOUBLE)
ASSERT_DEFINED(Tpetra_INST_FLOAT)

IF (${PACKAGE_NAME}_ENABLE_Triutils)

IF (Tpetra_INST_FLOAT)

TRIBITS_ADD_EXECUTABLE_AND_TEST(
Tpetra_BlockCG_DoubleFloat_test
SOURCES test_bl_cg_hb_df.cpp
ARGS "--verbose"
COMM serial mpi
)
TRIBITS_ADD_EXECUTABLE_AND_TEST(
Tpetra_pseudo_cg_hb
SOURCES test_pseudo_cg_hb.cpp
COMM serial mpi
ARGS "--verbose --filename=bcsstk14.hb"
STANDARD_PASS_OUTPUT
)

ENDIF()
TRIBITS_ADD_EXECUTABLE_AND_TEST(
Tpetra_resolve_cg_hb
SOURCES test_resolve_cg_hb.cpp
COMM serial mpi
ARGS "--verbose --filename=bcsstk14.hb"
STANDARD_PASS_OUTPUT
)

ASSERT_DEFINED(Tpetra_INST_COMPLEX_DOUBLE)
IF (Tpetra_INST_COMPLEX_DOUBLE)

TRIBITS_ADD_EXECUTABLE_AND_TEST(
Tpetra_BlockCG_complex_hb_test
SOURCES test_bl_cg_complex_hb.cpp
ARGS "--verbose"
COMM serial mpi
)
)

TRIBITS_COPY_FILES_TO_BINARY_DIR(Tpetra_BlockCG_complex_hb_CopyFiles
TRIBITS_COPY_FILES_TO_BINARY_DIR(
Tpetra_BlockCG_complex_hb_CopyFiles
SOURCE_DIR ${Anasazi_SOURCE_DIR}/testmatrices
SOURCE_FILES mhd1280b.cua
EXEDEPS Tpetra_BlockCG_complex_hb_test
)
)

ENDIF ()

ENDIF()
ENDIF()
ENDIF(${PACKAGE_NAME}_ENABLE_Triutils)

ASSERT_DEFINED(Anasazi_SOURCE_DIR)
TRIBITS_COPY_FILES_TO_BINARY_DIR(Tpetra_BlockCG_hb_CopyFiles2
SOURCE_DIR ${Anasazi_SOURCE_DIR}/testmatrices
SOURCE_FILES bcsstk14.hb
EXEDEPS Tpetra_BlockCG_hb_test
)

)
106 changes: 53 additions & 53 deletions packages/belos/tpetra/test/BlockCG/test_bl_cg_complex_hb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
// The initial guesses are all set to zero.
//
// NOTE: No preconditioner is used in this case.
//

#include "BelosConfigDefs.hpp"
#include "BelosLinearProblem.hpp"
#include "BelosTpetraAdapter.hpp"
Expand All @@ -54,41 +54,46 @@
#include <Teuchos_CommandLineProcessor.hpp>
#include <Teuchos_ParameterList.hpp>
#include <Teuchos_GlobalMPISession.hpp>

#include <Tpetra_Core.hpp>
#include <Tpetra_CrsMatrix.hpp>

// I/O for Harwell-Boeing files
#include <Trilinos_Util_iohb.h>

using namespace Teuchos;
using Tpetra::Operator;
using Tpetra::CrsMatrix;
using Tpetra::MultiVector;
using std::endl;
using std::cout;
using std::vector;
using Teuchos::tuple;

int main(int argc, char *argv[]) {
typedef Tpetra::MultiVector<>::scalar_type BSC;
typedef std::complex<BSC> ST;
typedef ScalarTraits<ST> SCT;
typedef SCT::magnitudeType MT;
typedef Tpetra::Operator<ST> OP;
typedef Tpetra::MultiVector<ST> MV;
typedef Belos::OperatorTraits<ST,MV,OP> OPT;
typedef Belos::MultiVecTraits<ST,MV> MVT;

GlobalMPISession mpisess(&argc,&argv,&cout);

const ST one = SCT::one();

template <typename ScalarType>
int run(int argc, char *argv[])
{
using BSC = typename Tpetra::MultiVector<ScalarType>::scalar_type;
using ST = typename std::complex<BSC>;

using OP = typename Tpetra::Operator<ST>;
using MV = typename Tpetra::MultiVector<ST>;
using tcrsmatrix_t = Tpetra::CrsMatrix<ST>;

using OPT = typename Belos::OperatorTraits<ST,MV,OP>;
using MVT = typename Belos::MultiVecTraits<ST,MV>;

using SCT = typename Teuchos::ScalarTraits<ST>;
using MT = typename SCT::magnitudeType;

using Tpetra::Operator;
using Tpetra::CrsMatrix;
using Tpetra::MultiVector;

using Teuchos::GlobalMPISession;
using Teuchos::Comm;
using Teuchos::RCP;
using Teuchos::CommandLineProcessor;
using Teuchos::ParameterList;

const ST one = SCT::one();

GlobalMPISession mpisess(&argc,&argv,&std::cout);
RCP<const Comm<int> > comm = Tpetra::getDefaultComm();
int MyPID = rank(*comm);

//
// Get test parameters from command-line processor
//
bool verbose = false, proc_verbose = false, debug = false;
int frequency = -1; // how often residuals are printed by solver
int numrhs = 1; // total number of right-hand sides to solve for
Expand Down Expand Up @@ -117,13 +122,12 @@ int main(int argc, char *argv[]) {
}

proc_verbose = ( verbose && (MyPID==0) );

if (proc_verbose) {
std::cout << Belos::Belos_Version() << std::endl << std::endl;
}

Belos::Tpetra::HarwellBoeingReader<Tpetra::CrsMatrix<ST> > reader( comm );
RCP<Tpetra::CrsMatrix<ST> > A = reader.readFromFile( filename );
Belos::Tpetra::HarwellBoeingReader<tcrsmatrix_t> reader( comm );
RCP<tcrsmatrix_t> A = reader.readFromFile( filename );
RCP<const Tpetra::Map<> > map = A->getMap();

// Create initial vectors
Expand All @@ -134,15 +138,12 @@ int main(int argc, char *argv[]) {
OPT::Apply( *A, *X, *B );
MVT::MvInit( *X, 0.0 );

//
// ********Other information used by block solver***********
// *****************(can be user specified)******************
//
// Other information used by block solver (can be user specified)
const int NumGlobalElements = B->getGlobalLength();
if (maxiters == -1) {
maxiters = NumGlobalElements/blocksize - 1; // maximum number of iterations to run
}
//

ParameterList belosList;
belosList.set( "Block Size", blocksize ); // Blocksize to be used by iterative solver
belosList.set( "Maximum Iterations", maxiters ); // Maximum number of iterations allowed
Expand All @@ -160,26 +161,20 @@ int main(int argc, char *argv[]) {
belosList.set( "Output Frequency", frequency );
}
}
//

// Construct an unpreconditioned linear problem instance.
//
Belos::LinearProblem<ST,MV,OP> problem( A, X, B );
bool set = problem.setProblem();
if (set == false) {
if (proc_verbose)
std::cout << std::endl << "ERROR: Belos::LinearProblem failed to set up correctly!" << std::endl;
return -1;
}
//
// *******************************************************************
// *************Start the block CG iteration***********************
// *******************************************************************
//

// Start the block CG iteration
Belos::BlockCGSolMgr<ST,MV,OP> solver( rcpFromRef(problem), rcpFromRef(belosList) );

//
// **********Print out information about problem*******************
//
// Print out information about problem
if (proc_verbose) {
std::cout << std::endl << std::endl;
std::cout << "Dimension of matrix: " << NumGlobalElements << std::endl;
Expand All @@ -189,13 +184,11 @@ int main(int argc, char *argv[]) {
std::cout << "Relative residual tolerance: " << tol << std::endl;
std::cout << std::endl;
}
//

// Perform solve
//
Belos::ReturnType ret = solver.solve();
//

// Compute actual residuals.
//
bool badRes = false;
std::vector<MT> actual_resids( numrhs );
std::vector<MT> rhs_norm( numrhs );
Expand All @@ -205,12 +198,12 @@ int main(int argc, char *argv[]) {
MVT::MvNorm( resid, actual_resids );
MVT::MvNorm( *B, rhs_norm );
if (proc_verbose) {
std::cout<< "---------- Actual Residuals (normalized) ----------"<<std::endl<<std::endl;
std::cout << "---------- Actual Residuals (normalized) ----------" << std::endl<<std::endl;
}
for ( int i=0; i<numrhs; i++) {
MT actRes = actual_resids[i]/rhs_norm[i];
if (proc_verbose) {
std::cout<<"Problem "<<i<<" : \t"<< actRes <<std::endl;
std::cout << "Problem "<<i<<" : \t"<< actRes << std::endl;
}
if (actRes > tol) badRes = true;
}
Expand All @@ -221,12 +214,19 @@ int main(int argc, char *argv[]) {
}
return -1;
}
//

// Default return value
//
if (proc_verbose) {
std::cout << "\nEnd Result: TEST PASSED" << std::endl;
}

return 0;
//
} // end test_bl_cg_complex_hb.cpp

int main(int argc, char *argv[]) {
return run<double>(argc,argv);

// wrapped with a check: CMake option Trilinos_ENABLE_FLOAT=ON
// return run<float>(argc,argv);
}

Loading

0 comments on commit 6779ba1

Please sign in to comment.