Skip to content

Commit

Permalink
Attempt to fix build failure described in issue #879.
Browse files Browse the repository at this point in the history
  • Loading branch information
ikalash committed Dec 23, 2022
1 parent 3e7ad72 commit 97930f4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/disc/stk/Albany_STKDiscretization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2307,8 +2307,12 @@ STKDiscretization::setupExodusOutput()

Ioss::Init::Initializer io;

Teuchos::Ptr<const Teuchos::MpiComm<int> > mpi_comm =
Teuchos::ptr_dynamic_cast<const Teuchos::MpiComm<int> >(Teuchos::ptrFromRef(*comm));
auto raw_mpi_comm = mpi_comm->getRawMpiComm();

mesh_data = Teuchos::rcp(
new stk::io::StkMeshIoBroker(getMpiCommFromTeuchosComm(comm)));
new stk::io::StkMeshIoBroker(*raw_mpi_comm));
mesh_data->set_bulk_data(Teuchos::get_shared_ptr(bulkData));
//IKT, 8/16/19: The following is needed to get correct output file for Schwarz problems
//Please see: https://github.com/trilinos/Trilinos/issues/5479
Expand Down
3 changes: 2 additions & 1 deletion src/landIce/interfaceWithCISM/ali_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ void ali_driver_init(int /* argc */, int /* exec_mode */, AliToGlimmer * ftg_ptr
comm = MPI_Comm_f2c(cism_communicator);
//MPI_COMM_size (comm, &cism_process_count);
//MPI_COMM_rank (comm, &my_cism_rank);
mpiCommT = Albany::createTeuchosCommFromMpiComm(comm);
//mpiCommT = Albany::createTeuchosCommFromMpiComm(comm);
mpiCommT = Teuchos::rcp(new Teuchos::MpiComm<int>(Teuchos::opaqueWrapper(comm),1984));

//IK, 4/4/14: get verbosity level specified in CISM *.config file
debug_output_verbosity = *(ftg_ptr -> getLongVar("debug_output_verbosity","options"));
Expand Down
6 changes: 4 additions & 2 deletions src/landIce/interfaceWithMPAS/Interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ void velocity_solver_export_fo_velocity(MPI_Comm reducedComm) {
}

int velocity_solver_init_mpi(MPI_Comm comm) {
mpiCommMPAS = Albany::createTeuchosCommFromMpiComm(comm);
//mpiCommMPAS = Albany::createTeuchosCommFromMpiComm(comm);
mpiCommMPAS = Teuchos::rcp(new Teuchos::MpiComm<int>(Teuchos::opaqueWrapper(comm),1984));
if(! Kokkos::is_initialized()) {
Kokkos::initialize();
kokkosInitializedByAlbany = true;
Expand Down Expand Up @@ -398,7 +399,8 @@ void velocity_solver_finalize() {
void velocity_solver_compute_2d_grid(MPI_Comm reducedComm) {
auto grid2DTimer = Teuchos::TimeMonitor(*Teuchos::TimeMonitor::getNewTimer("Albany: Compute 2D Grid"));
keptMesh = false;
mpiComm = Albany::createTeuchosCommFromMpiComm(reducedComm);
//mpiComm = Albany::createTeuchosCommFromMpiComm(reducedComm);
mpiComm = Teuchos::rcp(new Teuchos::MpiComm<int>(Teuchos::opaqueWrapper(reducedComm),1984));
}

void velocity_solver_set_physical_parameters(double const& gravity, double const& ice_density, double const& ocean_density, double const& sea_level, double const& flowParamA, double const& flowLawExponent, double const& dynamic_thickness, bool const& use_GLP, double const& clausiusClapeyoronCoeff) {
Expand Down

0 comments on commit 97930f4

Please sign in to comment.