- Timestamp:
- 04/20/12 19:07:47 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp
r12016 r12102 32 32 } 33 33 34 #ifdef _HAVE_MPI_ 34 35 MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 35 36 MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD); 36 37 found=mpi_found; 38 #endif 37 39 38 40 return found; … … 93 95 } 94 96 97 #ifdef _HAVE_MPI_ 95 98 MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 96 99 MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD); 97 100 num_unstable_constraints=sum_num_unstable_constraints; 101 #endif 98 102 99 103 /*Assign output pointers: */ … … 131 135 132 136 /*Is there just one found? that would mean we have frozen! : */ 137 #ifdef _HAVE_MPI_ 133 138 MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD ); 134 139 MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD); 135 140 found=mpi_found; 141 #endif 136 142 137 143 return found; … … 189 195 } 190 196 197 #ifdef _HAVE_MPI_ 191 198 MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 192 199 MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD); 193 200 found=mpi_found; 201 #endif 194 202 195 203 return found; … … 220 228 } 221 229 230 #ifdef _HAVE_MPI_ 222 231 MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 223 232 MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD); 224 233 found=mpi_found; 234 #endif 225 235 226 236 if (found){ … … 279 289 } 280 290 291 #ifdef _HAVE_MPI_ 281 292 MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 282 293 MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD); 283 294 num_unstable_constraints=sum_num_unstable_constraints; 295 #endif 284 296 285 297 /*Assign output pointers: */ … … 317 329 } 318 330 331 #ifdef _HAVE_MPI_ 319 332 MPI_Reduce (&max_penetration,&mpi_max_penetration,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD ); 320 333 MPI_Bcast(&mpi_max_penetration,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 321 334 max_penetration=mpi_max_penetration; 335 #endif 322 336 323 337 /*feed max_penetration to inputs: */ … … 354 368 } 355 369 370 #ifdef _HAVE_MPI_ 356 371 MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 357 372 MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD); 358 373 num_unstable_constraints=sum_num_unstable_constraints; 374 #endif 359 375 360 376 return num_unstable_constraints;
Note:
See TracChangeset
for help on using the changeset viewer.