ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/io/ZConsWriter.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-3.0/src/io/ZConsWriter.cpp (file contents):
Revision 1882 by tim, Thu Dec 2 05:17:10 2004 UTC vs.
Revision 1883 by tim, Mon Dec 13 22:30:27 2004 UTC

# Line 1 | Line 1
1   #include <algorithm>
2   #include <iostream>
3   #include <vector>
4 < //#include <pair>
4 >
5 >
6   #include "io/ZConsWriter.hpp"
7   #include "utils/simError.h"
8  
# Line 54 | Line 55 | void ZConsWriter::writeFZ(double time, int num, int* i
55   /**
56   *
57   */
58 < void ZConsWriter::writeFZ(double time, int num, int* index, double* fz, double* curZPos, double* zpos){
58 > void ZConsWriter::writeFZ(SimInfo* info, double time, int num, int* index, double* fz, double* curZPos, double* zpos){
59  
60   #ifndef IS_MPI
61    output << time << std::endl;
# Line 84 | Line 85 | void ZConsWriter::writeFZ(double time, int num, int* i
85    if(worldRank == 0){
86      
87      int globalIndexOfCurMol;
87    int *MolToProcMap;
88    MolToProcMap = mpiSim->getMolToProcMap();
88      
89      for(int i = 0; i < (int)(parameters->size()); i++){
90        
91        globalIndexOfCurMol = (*parameters)[i].zconsIndex;
92 <      whichNode = MolToProcMap[globalIndexOfCurMol];
92 >      whichNode = info->getMolToProc(globalIndexOfCurMol);
93        
94        if(whichNode == 0){
95          
# Line 119 | Line 118 | void ZConsWriter::writeFZ(double time, int num, int* i
118      
119      //Send ending request message to slave nodes    
120      status = EndOfRequest;
121 <    for(int i =1; i < mpiSim->getNProcessors(); i++)
121 >
122 >    int nproc;
123 >    MPI_Comm_size(MPI_COMM_WORLD, &nproc);
124 >
125 >    for(int i =1; i < nproc; i++)
126        MPI_Send(&status, 1, MPI_INT, i, tag, MPI_COMM_WORLD);
127      
128    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines