--- trunk/src/utils/simError.cpp 2013/06/16 15:15:42 1879 +++ trunk/src/utils/simError.cpp 2014/02/26 14:14:50 1969 @@ -39,14 +39,14 @@ * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). */ +#ifdef IS_MPI +#include +#endif #include #include #include #include "config.h" -#ifdef IS_MPI -#include -#endif int nChecks; @@ -64,7 +64,7 @@ void initSimError( void ){ painCave.isEventLoop = 0; nChecks = 0; #ifdef IS_MPI - worldRank = MPI::COMM_WORLD.Get_rank(); + MPI_Comm_rank( MPI_COMM_WORLD, &worldRank); #else worldRank = 0; #endif @@ -118,8 +118,8 @@ int simError( void ) { if (painCave.isFatal) { #ifdef IS_MPI - MPI::COMM_WORLD.Allreduce(&myError, &isError, 1, MPI::INT, MPI::LOR); - MPI::Finalize(); + MPI_Allreduce(&myError, &isError, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD); + MPI_Finalize(); #endif exit(0); } @@ -133,14 +133,14 @@ void errorCheckPoint( void ){ int isError = 0; #ifdef IS_MPI - MPI::COMM_WORLD.Allreduce(&myError, &isError, 1, MPI::INT, MPI::LOR); + MPI_Allreduce(&myError, &isError, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD); #else isError = myError; #endif if( isError ){ #ifdef IS_MPI - MPI::Finalize(); + MPI_Finalize(); #endif exit(0); }