# | Line 39 | Line 39 | |
---|---|---|
39 | * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). | |
40 | * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). | |
41 | */ | |
42 | + | #ifdef IS_MPI |
43 | + | #include <mpi.h> |
44 | + | #endif |
45 | ||
46 | #include <stdlib.h> | |
47 | #include <stdio.h> | |
48 | #include <string.h> | |
49 | #include "config.h" | |
47 | – | #ifdef IS_MPI |
48 | – | #include <mpi.h> |
49 | – | #endif |
50 | ||
51 | int nChecks; | |
52 | ||
# | Line 64 | Line 64 | void initSimError( void ){ | |
64 | painCave.isEventLoop = 0; | |
65 | nChecks = 0; | |
66 | #ifdef IS_MPI | |
67 | < | worldRank = MPI::COMM_WORLD.Get_rank(); |
67 | > | MPI_Comm_rank( MPI_COMM_WORLD, &worldRank); |
68 | #else | |
69 | worldRank = 0; | |
70 | #endif | |
# | Line 118 | Line 118 | int simError( void ) { | |
118 | ||
119 | if (painCave.isFatal) { | |
120 | #ifdef IS_MPI | |
121 | < | MPI::COMM_WORLD.Allreduce(&myError, &isError, 1, MPI::INT, MPI::LOR); |
122 | < | MPI::Finalize(); |
121 | > | MPI_Allreduce(&myError, &isError, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD); |
122 | > | MPI_Finalize(); |
123 | #endif | |
124 | exit(0); | |
125 | } | |
# | Line 133 | Line 133 | void errorCheckPoint( void ){ | |
133 | int isError = 0; | |
134 | ||
135 | #ifdef IS_MPI | |
136 | < | MPI::COMM_WORLD.Allreduce(&myError, &isError, 1, MPI::INT, MPI::LOR); |
136 | > | MPI_Allreduce(&myError, &isError, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD); |
137 | #else | |
138 | isError = myError; | |
139 | #endif | |
140 | ||
141 | if( isError ){ | |
142 | #ifdef IS_MPI | |
143 | < | MPI::Finalize(); |
143 | > | MPI_Finalize(); |
144 | #endif | |
145 | exit(0); | |
146 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |