00001
00002
00003 #ifndef TessToolWriter_h
00004 #define TessToolWriter_h
00005
00006 #include <string>
00007 #include <mpi.h>
00008 #include <iostream>
00009 #include <fstream>
00010 #include <sstream>
00011
00012 #include "RecordStream_Ascii.h"
00013 #include "MPICommunicationSession.h"
00014 #include "bieTags.h"
00015
00016 namespace BIE {
00017
00019 class TessToolWriter {
00020 public:
00021
00023 TessToolWriter(const std::string ofile, const MPI_Comm bieComm);
00024
00026 ~TessToolWriter();
00027
00029 bool CacheData();
00030
00031 private:
00032
00033 MPI_Comm _bieComm;
00034
00035 bool _first;
00036
00037 static int _instance;
00038 ofstream wwerr;
00039
00040 int _level, _step, _iter;
00041
00042 int _numTMs;
00043 int *_tmList;
00044 int _bufSizeInWords;
00045 int _numRecordsInBuffer;
00046
00047 MPI_Status *_status;
00048 MPI_Request *_request;
00049 int *_flag, *_completed, _numCompleted;
00050
00051 MPI_Datatype _mpidtype;
00052 RecordType *_rtype;
00053 int _typeSizeInBytes;
00054 char *_scratchDtypeBuffer;
00055 int _scratchBufferSizeInWords;
00056
00057 int filter_sessionId, filter_capacityInRecords, filter_recordSize;
00058
00059 void **_receivedBuffer;
00060 void *_currentBuffer;
00061
00062 std::string _ofile;
00063
00064
00065
00066 std::string _str;
00067 istringstream *_iss;
00068 RecordInputStream_Ascii * _ris;
00069
00070 };
00071 }
00072 #endif