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 |
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 |
|
*/ |
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> |
119 |
|
if (nProc % i == 0) nColumns = i; |
120 |
|
} |
121 |
|
|
122 |
+ |
// int nRows = nProc / nColumns; |
123 |
|
rowIndex_ = myRank / nColumns; |
124 |
|
columnIndex_ = myRank % nColumns; |
125 |
|
|
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); |