3 |
|
using namespace std; |
4 |
|
|
5 |
|
#ifdef IS_MPI |
6 |
+ |
#include <mpi.h> |
7 |
|
#include <mpi++.h> |
8 |
|
#endif //is_mpi |
9 |
|
|
18 |
|
entry_plug = the_entry_plug; |
19 |
|
int baseSeed = BASE_SEED; |
20 |
|
|
20 |
– |
cerr << "creating thermo stream\n"; |
21 |
|
gaussStream = new gaussianSPRNG( baseSeed ); |
22 |
– |
cerr << "created thermo stream\n"; |
22 |
|
} |
23 |
|
|
24 |
|
Thermo::~Thermo(){ |
67 |
|
} |
68 |
|
} |
69 |
|
#ifdef IS_MPI |
70 |
< |
MPI_COMM_WORLD.Allreduce(&kinetic,&kinetic_global,1,MPI_DOUBLE,MPI_SUM); |
70 |
> |
MPI::COMM_WORLD.Allreduce(&kinetic,&kinetic_global,1,MPI_DOUBLE,MPI_SUM); |
71 |
|
kinetic = kinetic_global; |
72 |
|
#endif //is_mpi |
73 |
|
|
98 |
|
|
99 |
|
// Get total potential for entire system from MPI. |
100 |
|
#ifdef IS_MPI |
101 |
< |
MPI_COMM_WORLD.Allreduce(&potential,&potential_global,1,MPI_DOUBLE,MPI_SUM); |
101 |
> |
MPI::COMM_WORLD.Allreduce(&potential,&potential_global,1,MPI_DOUBLE,MPI_SUM); |
102 |
|
potential = potential_global; |
103 |
+ |
|
104 |
|
#endif // is_mpi |
105 |
|
|
106 |
|
return potential; |
190 |
|
#ifdef IS_MPI |
191 |
|
#error "SPRNG random number generator must be used for MPI" |
192 |
|
#else |
193 |
< |
#warning "Using drand48 for random number generation" |
193 |
> |
// warning "Using drand48 for random number generation" |
194 |
|
#endif // is_mpi |
195 |
|
|
196 |
|
x = drand48(); |
266 |
|
#ifdef IS_MPI |
267 |
|
#error "SPRNG random number generator must be used for MPI" |
268 |
|
#else // is_mpi |
269 |
< |
#warning "Using drand48 for random number generation" |
269 |
> |
//warning "Using drand48 for random number generation" |
270 |
|
#endif // is_MPI |
271 |
|
|
272 |
|
vbar = sqrt( 2.0 * kebar * dAtom->getIxx() ); |