ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/io/ZConsWriter.cpp
(Generate patch)

Comparing trunk/src/io/ZConsWriter.cpp (file contents):
Revision 507 by gezelter, Fri Apr 15 22:04:00 2005 UTC vs.
Revision 1241 by gezelter, Fri Apr 25 15:14:47 2008 UTC

# Line 46 | Line 46
46  
47   #include "io/ZConsWriter.hpp"
48   #include "utils/simError.h"
49 + #ifdef IS_MPI
50 + #include <mpi.h>
51 + #endif
52  
50
53   namespace oopse {
54    ZConsWriter::ZConsWriter(SimInfo* info, const std::string& filename) : info_(info) {
55      //use master - slave mode, only master node writes to disk
# Line 110 | Line 112 | namespace oopse {
112  
113      MPI_Status ierr;
114      int zmolIndex;
115 <    double data[3];
115 >    RealType data[3];
116      
117      if (masterNode == 0) {
118  
# Line 130 | Line 132 | namespace oopse {
132          } else {
133            for(int k =0 ; k < nFixedZmolsInProc[i]; ++k) {
134              MPI_Recv(&zmolIndex, 1, MPI_INT, i, 0, MPI_COMM_WORLD,&ierr);
135 <            MPI_Recv(data, 3, MPI_DOUBLE, i, 0, MPI_COMM_WORLD,&ierr);
135 >            MPI_Recv(data, 3, MPI_REALTYPE, i, 0, MPI_COMM_WORLD,&ierr);
136              tmpData.zmolIndex = zmolIndex;
137              tmpData.zforce= data[0];
138              tmpData.zpos = data[1];
# Line 159 | Line 161 | namespace oopse {
161          data[1] = j->zpos;
162          data[2] = j->param.zTargetPos;
163          MPI_Send(&zmolIndex, 1, MPI_INT, masterNode, 0, MPI_COMM_WORLD);
164 <        MPI_Send(data, 3, MPI_DOUBLE, masterNode, 0, MPI_COMM_WORLD);
164 >        MPI_Send(data, 3, MPI_REALTYPE, masterNode, 0, MPI_COMM_WORLD);
165              
166        }
167      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines