X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/3db2602cfe30c61445e89cc334541ebb4ff76ed8..e9c0e0b98886738917300348a522759c25d4a9c7:/o815/obs.cpp?ds=inline diff --git a/o815/obs.cpp b/o815/obs.cpp index cd86bf6..37d1d4e 100644 --- a/o815/obs.cpp +++ b/o815/obs.cpp @@ -1,26 +1,44 @@ #include "o815.h" -void o815::obs::_meas(bool loadedobs) { - *olog << "OBS_" << obsid << ": meas not implemented!" << endl << flush; -}; +#include "latlib/hypercache.h" -void o815::obs::_finish() { - *olog << "OBS_" << obsid << ": finish not implemented!" << endl << flush; -}; +#ifndef MPI_DISABLED +#include +#endif void o815::obs::finish() { _finish(); } -void o815::obs::meas() { - _meas(true); +void o815::obs::start() { + if(O815->rank==0) { + *out << "#" << O815->programid << "-" << obsid << obsidpostfix << O815->headMaster() << endl << flush; + *out << "#" << O815->programid << "-" << obsid << obsidpostfix << O815->headMaster() << "-" << datadesc << endl << flush; + } + +#ifndef MPI_DISABLED + if (O815->comargs.outdir=="") + MPI_Barrier(MPI_COMM_WORLD); +#endif + + _start(); +} + +void o815::obs::meas(bool loadedobs, const int& nthmeas) { + _meas(loadedobs, nthmeas); } -o815::obs::obs(const string& _obsid, o815 *_O815) { +o815::obs::obs(const string& _obsid, const string& _datadesc, o815 *_O815, const int& obsmemSize, const string& _obsidpostfix) { obsid = _obsid; + obsidpostfix = _obsidpostfix; O815 = _O815; - - O815->out->newsub(obsid); - oout = O815->out->out[obsid]; - olog = O815->out->log; + datadesc = _datadesc; + O815->out->newsub(obsid+obsidpostfix); + + out = O815->out->out[obsid+obsidpostfix]; + log = O815->out->log; + paraQ = O815->paraQ; + + ocid = hypercache::initO(O815->programid + "-" + obsid, O815->comargs.nequi, O815->comargs.nskip, + O815->comargs.obscache.first, &obsMem, obsmemSize, O815->comargs.obscache.second, log); }