fixed a really dumb bug in MPI reduction of MPI component averages

This commit is contained in:
James E McClure 2015-08-18 10:09:08 -04:00
parent aef143cc62
commit 033f8bddb3

View File

@ -796,6 +796,7 @@ void TwoPhase::ComponentAverages(){
}
// Globally reduce the non-wetting phase averages
RecvBuffer.resize(BLOB_AVG_COUNT,NumberComponents_NWP);
/* for (int b=0; b<NumberComponents_NWP; b++){
MPI_Barrier(MPI_COMM_WORLD);
MPI_Allreduce(&ComponentAverages_NWP(0,b),&RecvBuffer(0),BLOB_AVG_COUNT,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
@ -807,7 +808,7 @@ void TwoPhase::ComponentAverages(){
MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
for (int b=0; b<NumberComponents_NWP; b++){
for (int idx=0; idx<BLOB_AVG_COUNT; idx++) ComponentAverages_NWP(idx,b)=RecvBuffer(b,idx);
for (int idx=0; idx<BLOB_AVG_COUNT; idx++) ComponentAverages_NWP(b,idx)=RecvBuffer(b,idx);
}
for (int b=0; b<NumberComponents_NWP; b++){
if (ComponentAverages_NWP(VOL,b) > 0.0){