50 main(
int argc,
char *argv[])
53 bool map_wrote =
false;
55 cerr <<
"part2flu <source_prefix> <target_prefix> <npartitions>" << endl;
61 MPI_Init(&argc,&argv);
68 std::ofstream DebugFile;
69 std::ostringstream DBFileName;
70 DBFileName <<
"gp2rstar_" <<
rank;
71 DebugFile.open(DBFileName.str().c_str());
73 string source_prefix(argv[1]);
74 string targ_prefix(argv[2]);
76 string snpart(argv[3]);
77 istringstream Istr(snpart);
83 if(npart < (
unsigned int)nproc){
89 R = npart - (nproc*N);
91 first = rank * N +
rank;
98 DebugFile <<
"Processing " << npart <<
" partitions." << std::endl
99 <<
"Local partitions: (" << N <<
"," << first
101 int part_index = first;
108 std::cout <<
"Processing " << part_index <<
"." << std::endl;
110 DebugFile <<
"Processing " << part_index <<
"." << std::endl;
112 std::ostringstream FileName;
113 FileName << source_prefix <<
"." << part_index <<
".asc";
114 Inf.open(FileName.str().c_str());
116 std::cerr <<
"Cannot open " << FileName.str() <<
", aborting." << std::endl;
124 my_partition.
_npart = npart;
126 std::cerr << rank <<
": TRAIL_FluInitSolver() failed, aborting." << std::endl;
130 my_partition.
debug();
131 my_partition.
_out = &DebugFile;
137 cerr << rank <<
": Cannot process " << FileName.str() <<
", aborting." << endl;
141 cout <<
"Done reading Bill's partition, populating Rocflu data." << endl;
143 DebugFile <<
"Done reading Bill's partition, populating Rocflu data." << std::endl;
149 std::cerr << rank <<
": TRAIL_FluPopulatePatches failed, aborting." << std::endl;
151 DebugFile <<
"Patches done." << std::endl;
159 DebugFile <<
"Volume solution done." << std::endl;
162 DebugFile <<
"Surface solution done." << std::endl;
164 DebugFile <<
"Writing Rocflu native data." << std::endl;
170 std::cerr << rank <<
": TRAIL_FluWriteNative failed, aborting." << std::endl;
174 if(!rank && !map_wrote){
187 DebugFile <<
"Done writing native files." << std::endl
188 <<
"Writing Rocstar data." << std::endl;
196 cout <<
" window created." << endl;
202 cout <<
" window data registered." << endl;
210 cout <<
" hdf files written." << endl;
215 cout <<
" window data destroyed." << endl;
218 cout <<
"Local partition " << n <<
" processed." << endl;
224 <<
"All local partitions processed. Waiting for other processors...";
227 std::cout <<
"done." << std::endl;
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_COMM_WORLD
bool InitRoccomWindows(const std::string &wname)
bool TRAIL_FluWriteMAP(GEM_Partition &gp, unsigned int nproc, unsigned int nregions, const std::string &path)
bool TRAIL_FluInitSolver(GEM_Partition &gp, const std::string &prefix="./")
This file contains the prototypes for Roccom API.
bool TRAIL_FluInitVolSoln(GEM_Partition &gp)
void COM_set_verbose(int i)
bool WriteRocstar(const std::string &, double t=0.0)
unsigned int _cell_ordering[4]
bool TRAIL_FluInitSurfSoln(GEM_DomainBoundary &db, const std::string &, bool all=true)
bool TRAIL_FluRegisterSurfMesh(GEM_Partition &gp)
bool TRAIL_FluPopulatePatches(GEM_Partition &gp)
bool TRAIL_FluRegisterSurfSoln(GEM_DomainBoundary &db, const std::string &wname, bool all=true)
bool TRAIL_FluWriteNative(GEM_Partition &gp, const std::string &path)
int main(int argc, char *argv[])
void COM_init(int *argc, char ***argv)
bool TRAIL_GeoPartReadASCII(GEM_Partition &gp, std::ifstream &Inf)
bool TRAIL_FluRegisterVolSoln(GEM_Partition &gp, bool all=true)