--- trunk/src/constraints/ZconstraintForceManager.cpp 2014/02/20 16:27:30 1968 +++ trunk/src/constraints/ZconstraintForceManager.cpp 2014/02/26 14:14:50 1969 @@ -161,8 +161,8 @@ namespace OpenMD { #ifndef IS_MPI totMassUnconsMols_ = totMassUnconsMols_local; #else - MPI::COMM_WORLD.Allreduce(&totMassUnconsMols_local, &totMassUnconsMols_, 1, - MPI::REALTYPE, MPI::SUM); + MPI_Allreduce(&totMassUnconsMols_local, &totMassUnconsMols_, 1, + MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); #endif // creat zconsWriter @@ -326,8 +326,8 @@ namespace OpenMD { #ifndef IS_MPI pzMovingMols = pzMovingMols_local; #else - MPI::COMM_WORLD.Allreduce(&pzMovingMols_local, &pzMovingMols, 1, - MPI::REALTYPE, MPI::SUM); + MPI_Allreduce(&pzMovingMols_local, &pzMovingMols, 1, + MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); #endif RealType vzMovingMols = pzMovingMols / (totMassMovingZMols_ + totMassUnconsMols_); @@ -397,8 +397,8 @@ namespace OpenMD { //calculate total z-constraint force #ifdef IS_MPI - MPI::COMM_WORLD.Allreduce(&totalFZ_local, &totalFZ, 1, - MPI::REALTYPE, MPI::SUM); + MPI_Allreduce(&totalFZ_local, &totalFZ, 1, + MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); #else totalFZ = totalFZ_local; #endif @@ -481,8 +481,8 @@ namespace OpenMD { #ifndef IS_MPI totalFZ = totalFZ_local; #else - MPI::COMM_WORLD.Allreduce(&totalFZ_local, &totalFZ, 1, MPI::REALTYPE, - MPI::SUM); + MPI_Allreduce(&totalFZ_local, &totalFZ, 1, MPI_REALTYPE, + MPI_SUM, MPI_COMM_WORLD); #endif //modify the forces of unconstrained molecules @@ -554,7 +554,7 @@ namespace OpenMD { #ifndef IS_MPI changed = changed_local; #else - MPI::COMM_WORLD.Allreduce(&changed_local, &changed, 1, MPI::INT, MPI::SUM); + MPI_Allreduce(&changed_local, &changed, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD); #endif return (changed > 0); @@ -567,8 +567,8 @@ namespace OpenMD { #ifndef IS_MPI havingFixed = havingFixed_local; #else - MPI::COMM_WORLD.Allreduce(&havingFixed_local, &havingFixed, 1, - MPI::INT, MPI::SUM); + MPI_Allreduce(&havingFixed_local, &havingFixed, 1, + MPI_INT, MPI_SUM, MPI_COMM_WORLD); #endif return havingFixed > 0; @@ -584,8 +584,8 @@ namespace OpenMD { #ifndef IS_MPI havingMoving = havingMoving_local; #else - MPI::COMM_WORLD.Allreduce(&havingMoving_local, &havingMoving, 1, - MPI::INT, MPI::SUM); + MPI_Allreduce(&havingMoving_local, &havingMoving, 1, + MPI_INT, MPI_SUM, MPI_COMM_WORLD); #endif return havingMoving > 0; @@ -600,8 +600,8 @@ namespace OpenMD { } #ifdef IS_MPI - MPI::COMM_WORLD.Allreduce(&totMassMovingZMols_local, &totMassMovingZMols_, - 1, MPI::REALTYPE, MPI::SUM); + MPI_Allreduce(&totMassMovingZMols_local, &totMassMovingZMols_, + 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); #else totMassMovingZMols_ = totMassMovingZMols_local; #endif @@ -648,7 +648,7 @@ namespace OpenMD { zTargetPos = com[whichDirection]; #else int whicProc = info_->getMolToProc(index); - MPI::COMM_WORLD.Bcast(&zTargetPos, 1, MPI::REALTYPE, whicProc); + MPI_Bcast(&zTargetPos, 1, MPI_REALTYPE, whicProc, MPI_COMM_WORLD); #endif return zTargetPos; }