Skip to content

Commit 50aa9a3

Browse files
authored
Merge pull request ornladios#3593 from ax3l/fix-mpireal8-example
Heat Transfer Example: MPI Datatype
2 parents 1b9daa5 + db33c52 commit 50aa9a3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/heatTransfer/write/HeatTransfer.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ void HeatTransfer::exchange(MPI_Comm comm)
136136
{
137137
// Build a custom MPI type for the column vector to allow strided access
138138
MPI_Datatype tColumnVector;
139-
MPI_Type_vector(m_s.ndx + 2, 1, m_s.ndy + 2, MPI_REAL8, &tColumnVector);
139+
MPI_Type_vector(m_s.ndx + 2, 1, m_s.ndy + 2, MPI_DOUBLE, &tColumnVector);
140140
MPI_Type_commit(&tColumnVector);
141141

142142
// Exchange ghost cells, in the order left-right-up-down
@@ -184,14 +184,14 @@ void HeatTransfer::exchange(MPI_Comm comm)
184184
{
185185
// std::cout << "Rank " << m_s.rank << " send down to rank "
186186
// << m_s.rank_down << std::endl;
187-
MPI_Send(m_TCurrent[m_s.ndx], m_s.ndy + 2, MPI_REAL8, m_s.rank_down,
187+
MPI_Send(m_TCurrent[m_s.ndx], m_s.ndy + 2, MPI_DOUBLE, m_s.rank_down,
188188
tag, comm);
189189
}
190190
if (m_s.rank_up >= 0)
191191
{
192192
// std::cout << "Rank " << m_s.rank << " receive from above from rank "
193193
// << m_s.rank_up << std::endl;
194-
MPI_Recv(m_TCurrent[0], m_s.ndy + 2, MPI_REAL8, m_s.rank_up, tag, comm,
194+
MPI_Recv(m_TCurrent[0], m_s.ndy + 2, MPI_DOUBLE, m_s.rank_up, tag, comm,
195195
&status);
196196
}
197197

@@ -202,13 +202,13 @@ void HeatTransfer::exchange(MPI_Comm comm)
202202
// std::cout << "Rank " << m_s.rank << " send up to rank " <<
203203
// m_s.rank_up
204204
// << std::endl;
205-
MPI_Send(m_TCurrent[1], m_s.ndy + 2, MPI_REAL8, m_s.rank_up, tag, comm);
205+
MPI_Send(m_TCurrent[1], m_s.ndy + 2, MPI_DOUBLE, m_s.rank_up, tag, comm);
206206
}
207207
if (m_s.rank_down >= 0)
208208
{
209209
// std::cout << "Rank " << m_s.rank << " receive from below from rank "
210210
// << m_s.rank_down << std::endl;
211-
MPI_Recv(m_TCurrent[m_s.ndx + 1], m_s.ndy + 2, MPI_REAL8, m_s.rank_down,
211+
MPI_Recv(m_TCurrent[m_s.ndx + 1], m_s.ndy + 2, MPI_DOUBLE, m_s.rank_down,
212212
tag, comm, &status);
213213
}
214214
}

0 commit comments

Comments
 (0)