Skip to content

Commit 97930f4

Browse files
committed
Attempt to fix build failure described in issue #879.
1 parent 3e7ad72 commit 97930f4

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

src/disc/stk/Albany_STKDiscretization.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -2307,8 +2307,12 @@ STKDiscretization::setupExodusOutput()
23072307

23082308
Ioss::Init::Initializer io;
23092309

2310+
Teuchos::Ptr<const Teuchos::MpiComm<int> > mpi_comm =
2311+
Teuchos::ptr_dynamic_cast<const Teuchos::MpiComm<int> >(Teuchos::ptrFromRef(*comm));
2312+
auto raw_mpi_comm = mpi_comm->getRawMpiComm();
2313+
23102314
mesh_data = Teuchos::rcp(
2311-
new stk::io::StkMeshIoBroker(getMpiCommFromTeuchosComm(comm)));
2315+
new stk::io::StkMeshIoBroker(*raw_mpi_comm));
23122316
mesh_data->set_bulk_data(Teuchos::get_shared_ptr(bulkData));
23132317
//IKT, 8/16/19: The following is needed to get correct output file for Schwarz problems
23142318
//Please see: https://github.com/trilinos/Trilinos/issues/5479

src/landIce/interfaceWithCISM/ali_driver.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ void ali_driver_init(int /* argc */, int /* exec_mode */, AliToGlimmer * ftg_ptr
160160
comm = MPI_Comm_f2c(cism_communicator);
161161
//MPI_COMM_size (comm, &cism_process_count);
162162
//MPI_COMM_rank (comm, &my_cism_rank);
163-
mpiCommT = Albany::createTeuchosCommFromMpiComm(comm);
163+
//mpiCommT = Albany::createTeuchosCommFromMpiComm(comm);
164+
mpiCommT = Teuchos::rcp(new Teuchos::MpiComm<int>(Teuchos::opaqueWrapper(comm),1984));
164165

165166
//IK, 4/4/14: get verbosity level specified in CISM *.config file
166167
debug_output_verbosity = *(ftg_ptr -> getLongVar("debug_output_verbosity","options"));

src/landIce/interfaceWithMPAS/Interface.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ void velocity_solver_export_fo_velocity(MPI_Comm reducedComm) {
347347
}
348348

349349
int velocity_solver_init_mpi(MPI_Comm comm) {
350-
mpiCommMPAS = Albany::createTeuchosCommFromMpiComm(comm);
350+
//mpiCommMPAS = Albany::createTeuchosCommFromMpiComm(comm);
351+
mpiCommMPAS = Teuchos::rcp(new Teuchos::MpiComm<int>(Teuchos::opaqueWrapper(comm),1984));
351352
if(! Kokkos::is_initialized()) {
352353
Kokkos::initialize();
353354
kokkosInitializedByAlbany = true;
@@ -398,7 +399,8 @@ void velocity_solver_finalize() {
398399
void velocity_solver_compute_2d_grid(MPI_Comm reducedComm) {
399400
auto grid2DTimer = Teuchos::TimeMonitor(*Teuchos::TimeMonitor::getNewTimer("Albany: Compute 2D Grid"));
400401
keptMesh = false;
401-
mpiComm = Albany::createTeuchosCommFromMpiComm(reducedComm);
402+
//mpiComm = Albany::createTeuchosCommFromMpiComm(reducedComm);
403+
mpiComm = Teuchos::rcp(new Teuchos::MpiComm<int>(Teuchos::opaqueWrapper(reducedComm),1984));
402404
}
403405

404406
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) {

0 commit comments

Comments
 (0)