[cig-commits] [commit] master: Get the #ifdef right (03fb8c8)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Mon Sep 22 13:26:46 PDT 2014
Repository : https://github.com/geodynamics/vc
On branch : master
Link : https://github.com/geodynamics/vc/compare/3783bed986b2ffcb58eea7824e7add531326932c...082524e7240f51389b2429bcb08d3f4fa4715b12
>---------------------------------------------------------------
commit 03fb8c89437eb566f3bbc55a206710754a4650fa
Author: Eric Heien <emheien at ucdavis.edu>
Date: Mon Sep 22 13:25:14 2014 -0700
Get the #ifdef right
This fixes the problem with MPI runs having correct event information
but incorrect sweeps
>---------------------------------------------------------------
03fb8c89437eb566f3bbc55a206710754a4650fa
src/simulation/RunEvent.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/simulation/RunEvent.cpp b/src/simulation/RunEvent.cpp
index 673f460..373562a 100644
--- a/src/simulation/RunEvent.cpp
+++ b/src/simulation/RunEvent.cpp
@@ -395,7 +395,7 @@ void RunEvent::recordEventStresses(VCSimulation *sim) {
sim->getInitialFinalStresses(involved_blocks, shear_init, shear_final, normal_init, normal_final);
// If we have multiple processors, sum the values and store on the root node
-#ifdef HAVE_MPI
+#ifdef MPI_C_FOUND
MPI_Reduce(&shear_init, &total_shear_init, 1, MPI_DOUBLE, MPI_SUM, ROOT_NODE_RANK, MPI_COMM_WORLD);
MPI_Reduce(&shear_final, &total_shear_final, 1, MPI_DOUBLE, MPI_SUM, ROOT_NODE_RANK, MPI_COMM_WORLD);
MPI_Reduce(&normal_init, &total_normal_init, 1, MPI_DOUBLE, MPI_SUM, ROOT_NODE_RANK, MPI_COMM_WORLD);
More information about the CIG-COMMITS
mailing list