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

MueLu: Adding support for driving Galeri options via ParameterList in Driver #9871

Merged
merged 3 commits into from
Oct 28, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion packages/muelu/test/scaling/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ IF (${PACKAGE_NAME}_HAVE_TPETRA_SOLVER_STACK OR ${PACKAGE_NAME}_HAVE_EPETRA_SOLV
)

TRIBITS_COPY_FILES_TO_BINARY_DIR(Driver_cp
SOURCE_FILES scaling.xml scaling.yaml scaling-complex.xml scaling-withglobalconstants.xml scaling-complex-withglobalconstants.xml circ_nsp_dependency.xml isorropia.xml iso_poisson.xml conchas_milestone_zoltan.xml conchas_milestone_zoltan2.xml conchas_milestone_zoltan2_complex.xml sa_with_ilu.xml sa_with_Ifpack2_line_detection.xml rap.xml smoother.xml smoother_complex.xml tripleMatrixProduct.xml scaling-ml.xml elasticity3D.xml amgx.json amgx.xml scaling-with-rerun.xml scaling_distance2_agg.xml smooVec.mm smooVecCoalesce.xml pairwise.xml sa_enforce_constraints.xml recurMG.xml
SOURCE_FILES scaling.xml scaling.yaml scaling-complex.xml scaling-withglobalconstants.xml scaling-complex-withglobalconstants.xml circ_nsp_dependency.xml isorropia.xml iso_poisson.xml conchas_milestone_zoltan.xml conchas_milestone_zoltan2.xml conchas_milestone_zoltan2_complex.xml sa_with_ilu.xml sa_with_Ifpack2_line_detection.xml rap.xml smoother.xml smoother_complex.xml tripleMatrixProduct.xml scaling-ml.xml elasticity3D.xml amgx.json amgx.xml scaling-with-rerun.xml scaling_distance2_agg.xml smooVec.mm smooVecCoalesce.xml pairwise.xml sa_enforce_constraints.xml recurMG.xml anisotropic.xml
CATEGORIES BASIC PERFORMANCE
)

Expand Down Expand Up @@ -114,6 +114,15 @@ TRIBITS_ADD_TEST(
CATEGORIES PERFORMANCE
)


TRIBITS_ADD_TEST(
Driver
NAME Driver_anisotropic
ARGS "--xml=anisotropic.xml --tol=1e-6"
NUM_MPI_PROCS 4
COMM mpi # HAVE_MPI required
)

# not very elegant. The best would probably to make Reuse.cpp work for both Epetra and Tpetra
IF (${PACKAGE_NAME}_HAVE_TPETRA_SOLVER_STACK)
TRIBITS_ADD_EXECUTABLE(
Expand Down Expand Up @@ -188,6 +197,7 @@ IF (${PACKAGE_NAME}_HAVE_EPETRA_SOLVER_STACK AND (NOT Xpetra_INT_LONG_LONG))
NUM_MPI_PROCS 4
COMM mpi # HAVE_MPI required
)


TRIBITS_ADD_TEST(
Driver
Expand Down
13 changes: 12 additions & 1 deletion packages/muelu/test/scaling/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,19 @@ MueLu::MueLu_AMGX_initialize_plugins();
if (paramList.isParameter(name))
realParams.setEntry(name, paramList.getEntry(name));
}
}

// Galeri updates (only works with Run1)
if(paramList.sublist("Run1").isSublist("Galeri")) {
ParameterList& moreParams = paramList.sublist("Run1").sublist("Galeri");
std::cout<<"*** moreParams ***"<<std::endl<<moreParams<<std::endl;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider changing std::cout to out to avoid all processes printing.

for (ParameterList::ConstIterator it = moreParams.begin(); it != moreParams.end(); it++) {
const std::string& name = moreParams.name(it);
if (moreParams.isParameter(name))
realParams.setEntry(name, moreParams.getEntry(name));
}
}
}

#ifdef HAVE_MPI
// Generate the node-level communicator, if we want one
Teuchos::RCP<const Teuchos::Comm<int> > nodeComm;
Expand Down