89 |
|
} |
90 |
|
|
91 |
|
#ifdef IS_MPI |
92 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &kinetic, 1, MPI::REALTYPE, |
93 |
< |
MPI::SUM); |
92 |
> |
MPI_Allreduce(MPI_IN_PLACE, &kinetic, 1, MPI_REALTYPE, |
93 |
> |
MPI_SUM, MPI_COMM_WORLD); |
94 |
|
#endif |
95 |
|
|
96 |
|
kinetic = kinetic * 0.5 / PhysicalConstants::energyConvert; |
140 |
|
} |
141 |
|
|
142 |
|
#ifdef IS_MPI |
143 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &kinetic, 1, MPI::REALTYPE, |
144 |
< |
MPI::SUM); |
143 |
> |
MPI_Allreduce(MPI_IN_PLACE, &kinetic, 1, MPI_REALTYPE, |
144 |
> |
MPI_SUM, MPI_COMM_WORLD); |
145 |
|
#endif |
146 |
|
|
147 |
|
kinetic = kinetic * 0.5 / PhysicalConstants::energyConvert; |
227 |
|
} |
228 |
|
|
229 |
|
#ifdef IS_MPI |
230 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &kinetic, 1, MPI::REALTYPE, |
231 |
< |
MPI::SUM); |
230 |
> |
MPI_Allreduce(MPI_IN_PLACE, &kinetic, 1, MPI_REALTYPE, |
231 |
> |
MPI_SUM, MPI_COMM_WORLD); |
232 |
|
#endif |
233 |
|
|
234 |
|
kinetic *= 0.5; |
297 |
|
} |
298 |
|
|
299 |
|
#ifdef IS_MPI |
300 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, p_tens.getArrayPointer(), 9, |
301 |
< |
MPI::REALTYPE, MPI::SUM); |
300 |
> |
MPI_Allreduce(MPI_IN_PLACE, p_tens.getArrayPointer(), 9, |
301 |
> |
MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
302 |
|
#endif |
303 |
|
|
304 |
|
RealType volume = this->getVolume(); |
379 |
|
|
380 |
|
|
381 |
|
#ifdef IS_MPI |
382 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &pChg, 1, MPI::REALTYPE, |
383 |
< |
MPI::SUM); |
384 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &nChg, 1, MPI::REALTYPE, |
385 |
< |
MPI::SUM); |
386 |
< |
|
387 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &pCount, 1, MPI::INTEGER, |
388 |
< |
MPI::SUM); |
389 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &nCount, 1, MPI::INTEGER, |
390 |
< |
MPI::SUM); |
391 |
< |
|
392 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, pPos.getArrayPointer(), 3, |
393 |
< |
MPI::REALTYPE, MPI::SUM); |
394 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, nPos.getArrayPointer(), 3, |
395 |
< |
MPI::REALTYPE, MPI::SUM); |
382 |
> |
MPI_Allreduce(MPI_IN_PLACE, &pChg, 1, MPI_REALTYPE, |
383 |
> |
MPI_SUM, MPI_COMM_WORLD); |
384 |
> |
MPI_Allreduce(MPI_IN_PLACE, &nChg, 1, MPI_REALTYPE, |
385 |
> |
MPI_SUM, MPI_COMM_WORLD); |
386 |
> |
|
387 |
> |
MPI_Allreduce(MPI_IN_PLACE, &pCount, 1, MPI_INTEGER, |
388 |
> |
MPI_SUM, MPI_COMM_WORLD); |
389 |
> |
MPI_Allreduce(MPI_IN_PLACE, &nCount, 1, MPI_INTEGER, |
390 |
> |
MPI_SUM, MPI_COMM_WORLD); |
391 |
> |
|
392 |
> |
MPI_Allreduce(MPI_IN_PLACE, pPos.getArrayPointer(), 3, |
393 |
> |
MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
394 |
> |
MPI_Allreduce(MPI_IN_PLACE, nPos.getArrayPointer(), 3, |
395 |
> |
MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
396 |
|
|
397 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, dipoleVector.getArrayPointer(), |
398 |
< |
3, MPI::REALTYPE, MPI::SUM); |
397 |
> |
MPI_Allreduce(MPI_IN_PLACE, dipoleVector.getArrayPointer(), |
398 |
> |
3, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
399 |
|
#endif |
400 |
|
|
401 |
|
// first load the accumulated dipole moment (if dipoles were present) |
498 |
|
* reduced among all processors. |
499 |
|
*/ |
500 |
|
#ifdef IS_MPI |
501 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &heatFluxJc[0], 3, MPI::REALTYPE, |
502 |
< |
MPI::SUM); |
501 |
> |
MPI_Allreduce(MPI_IN_PLACE, &heatFluxJc[0], 3, MPI_REALTYPE, |
502 |
> |
MPI_SUM, MPI_COMM_WORLD); |
503 |
|
#endif |
504 |
|
|
505 |
|
// (kcal/mol * A/fs) * conversion => (amu A^3)/fs^3 |
531 |
|
} |
532 |
|
|
533 |
|
#ifdef IS_MPI |
534 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &totalMass, 1, MPI::REALTYPE, |
535 |
< |
MPI::SUM); |
536 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, comVel.getArrayPointer(), 3, |
537 |
< |
MPI::REALTYPE, MPI::SUM); |
534 |
> |
MPI_Allreduce(MPI_IN_PLACE, &totalMass, 1, MPI_REALTYPE, |
535 |
> |
MPI_SUM, MPI_COMM_WORLD); |
536 |
> |
MPI_Allreduce(MPI_IN_PLACE, comVel.getArrayPointer(), 3, |
537 |
> |
MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
538 |
|
#endif |
539 |
|
|
540 |
|
comVel /= totalMass; |
562 |
|
} |
563 |
|
|
564 |
|
#ifdef IS_MPI |
565 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &totalMass, 1, MPI::REALTYPE, |
566 |
< |
MPI::SUM); |
567 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, com.getArrayPointer(), 3, |
568 |
< |
MPI::REALTYPE, MPI::SUM); |
565 |
> |
MPI_Allreduce(MPI_IN_PLACE, &totalMass, 1, MPI_REALTYPE, |
566 |
> |
MPI_SUM, MPI_COMM_WORLD); |
567 |
> |
MPI_Allreduce(MPI_IN_PLACE, com.getArrayPointer(), 3, |
568 |
> |
MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
569 |
|
#endif |
570 |
|
|
571 |
|
com /= totalMass; |
600 |
|
} |
601 |
|
|
602 |
|
#ifdef IS_MPI |
603 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &totalMass, 1, MPI::REALTYPE, |
604 |
< |
MPI::SUM); |
605 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, com.getArrayPointer(), 3, |
606 |
< |
MPI::REALTYPE, MPI::SUM); |
607 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, comVel.getArrayPointer(), 3, |
608 |
< |
MPI::REALTYPE, MPI::SUM); |
603 |
> |
MPI_Allreduce(MPI_IN_PLACE, &totalMass, 1, MPI_REALTYPE, |
604 |
> |
MPI_SUM, MPI_COMM_WORLD); |
605 |
> |
MPI_Allreduce(MPI_IN_PLACE, com.getArrayPointer(), 3, |
606 |
> |
MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
607 |
> |
MPI_Allreduce(MPI_IN_PLACE, comVel.getArrayPointer(), 3, |
608 |
> |
MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
609 |
|
#endif |
610 |
|
|
611 |
|
com /= totalMass; |
684 |
|
inertiaTensor(2,2) = xx + yy; |
685 |
|
|
686 |
|
#ifdef IS_MPI |
687 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, inertiaTensor.getArrayPointer(), |
688 |
< |
9, MPI::REALTYPE, MPI::SUM); |
689 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, |
690 |
< |
angularMomentum.getArrayPointer(), 3, |
691 |
< |
MPI::REALTYPE, MPI::SUM); |
687 |
> |
MPI_Allreduce(MPI_IN_PLACE, inertiaTensor.getArrayPointer(), |
688 |
> |
9, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
689 |
> |
MPI_Allreduce(MPI_IN_PLACE, |
690 |
> |
angularMomentum.getArrayPointer(), 3, |
691 |
> |
MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
692 |
|
#endif |
693 |
|
|
694 |
|
snap->setCOMw(angularMomentum); |
745 |
|
} |
746 |
|
|
747 |
|
#ifdef IS_MPI |
748 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &bMax[0], 3, MPI::REALTYPE, |
749 |
< |
MPI::MAX); |
748 |
> |
MPI_Allreduce(MPI_IN_PLACE, &bMax[0], 3, MPI_REALTYPE, |
749 |
> |
MPI_MAX, MPI_COMM_WORLD); |
750 |
|
|
751 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &bMin[0], 3, MPI::REALTYPE, |
752 |
< |
MPI::MIN); |
751 |
> |
MPI_Allreduce(MPI_IN_PLACE, &bMin[0], 3, MPI_REALTYPE, |
752 |
> |
MPI_MIN, MPI_COMM_WORLD); |
753 |
|
#endif |
754 |
|
Mat3x3d bBox = Mat3x3d(0.0); |
755 |
|
for (int i = 0; i < 3; i++) { |
792 |
|
} |
793 |
|
|
794 |
|
#ifdef IS_MPI |
795 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, |
796 |
< |
angularMomentum.getArrayPointer(), 3, |
797 |
< |
MPI::REALTYPE, MPI::SUM); |
795 |
> |
MPI_Allreduce(MPI_IN_PLACE, |
796 |
> |
angularMomentum.getArrayPointer(), 3, |
797 |
> |
MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
798 |
|
#endif |
799 |
|
|
800 |
|
snap->setCOMw(angularMomentum); |
887 |
|
data[0] = pos1.x(); |
888 |
|
data[1] = pos1.y(); |
889 |
|
data[2] = pos1.z(); |
890 |
< |
MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc1); |
890 |
> |
MPI_Bcast(data, 3, MPI_REALTYPE, proc1, MPI_COMM_WORLD); |
891 |
|
} else { |
892 |
< |
MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc1); |
892 |
> |
MPI_Bcast(data, 3, MPI_REALTYPE, proc1, MPI_COMM_WORLD); |
893 |
|
pos1 = Vector3d(data); |
894 |
|
} |
895 |
|
|
899 |
|
data[0] = pos2.x(); |
900 |
|
data[1] = pos2.y(); |
901 |
|
data[2] = pos2.z(); |
902 |
< |
MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc2); |
902 |
> |
MPI_Bcast(data, 3, MPI_REALTYPE, proc2, MPI_COMM_WORLD); |
903 |
|
} else { |
904 |
< |
MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc2); |
904 |
> |
MPI_Bcast(data, 3, MPI_REALTYPE, proc2, MPI_COMM_WORLD); |
905 |
|
pos2 = Vector3d(data); |
906 |
|
} |
907 |
|
#else |