ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/parallel/Communicator.hpp
(Generate patch)

Comparing trunk/src/parallel/Communicator.hpp (file contents):
Revision 1796 by gezelter, Mon Sep 10 18:38:44 2012 UTC vs.
Revision 1879 by gezelter, Sun Jun 16 15:15:42 2013 UTC

# Line 2 | Line 2
2   * @file Communicator.hpp
3   * @author Charles Vardeman <cvardema.at.nd.edu>
4   * @date 08/18/2010
5 * @time 11:56am
5   * @version 1.0
6   *
7   * @section LICENSE
# Line 42 | Line 41
41   *                                                                      
42   * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).            
43   * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).          
44 < * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).          
44 > * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).          
45   * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
46   * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
47   */
# Line 89 | Line 88 | namespace OpenMD{
88      static int Length() {return 3;}
89    };
90  
91 <  template<class T, unsigned int Row, unsigned int Col>
92 <  class MPITraits< RectMatrix<T, Row, Col> > {
91 >  template<class T, unsigned int R, unsigned int C>
92 >  class MPITraits< RectMatrix<T, R, C> > {
93    public:
94      static MPI::Datatype Type() { return MPITraits<T>::Type(); }
95 <    static int Length() {return Row * Col;}
95 >    static int Length() {return R * C;}
96    };
97  
98    template<class T>
# Line 120 | Line 119 | namespace OpenMD{
119          if (nProc % i == 0) nColumns = i;        
120        }
121          
122 +      // int nRows = nProc / nColumns;
123        rowIndex_ = myRank / nColumns;      
124        columnIndex_ = myRank % nColumns;
125  
# Line 149 | Line 149 | namespace OpenMD{
149    class Plan {
150    public:
151      
152 <    Plan<T>(MPI::Intracomm comm, int nObjects) {
153 <      myComm = comm;
152 >    Plan<T>(MPI::Intracomm comm, int nObjects) : myComm(comm) {
153        int nCommProcs = myComm.Get_size();
154        
155        counts.resize(nCommProcs, 0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines