--- trunk/src/restraints/RestraintForceManager.cpp 2013/10/31 15:32:17 1938 +++ trunk/src/restraints/RestraintForceManager.cpp 2014/03/06 19:34:22 1973 @@ -136,7 +136,9 @@ namespace OpenMD { // this proc doesn't have the molecule. Do a quick check to // make sure another processor is supposed to have it. - int myrank = MPI::COMM_WORLD.Get_rank(); + int myrank; + MPI_Comm_rank( MPI_COMM_WORLD, &myrank); + if (info_->getMolToProc(molIndex) == myrank) { // If we were supposed to have it but got a null, then freak out. @@ -158,7 +160,8 @@ namespace OpenMD { #ifdef IS_MPI // only handle this molecular restraint if this processor owns the // molecule - int myrank = MPI::COMM_WORLD.Get_rank(); + int myrank; + MPI_Comm_rank( MPI_COMM_WORLD, &myrank); if (info_->getMolToProc(molIndex) == myrank) { #endif @@ -228,6 +231,7 @@ namespace OpenMD { "\t\t%s\n" "\twill result in %d integrable objects being\n" "\trestrained.\n", objectSelection.c_str(), selectionCount); + painCave.severity = OPENMD_INFO; painCave.isFatal = 0; simError(); @@ -315,8 +319,8 @@ namespace OpenMD { restPot_local = doRestraints(1.0); #ifdef IS_MPI - MPI::COMM_WORLD.Allreduce(&restPot_local, &restPot, 1, - MPI::REALTYPE, MPI::SUM); + MPI_Allreduce(&restPot_local, &restPot, 1, + MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); #else restPot = restPot_local; #endif @@ -388,6 +392,7 @@ namespace OpenMD { std::vector struc; std::vector forces; + for(sd = (*rm)->beginIntegrableObject(ioi); sd != NULL; sd = (*rm)->nextIntegrableObject(ioi)) { @@ -448,7 +453,6 @@ namespace OpenMD { // phew. At this point, we should have the pointer to the // correct Object restraint in the variable oRest. - oRest->setScaleFactor(scalingFactor); Vector3d pos = (*ro)->getPos();