]> git.treefish.org Git - phys/latlib.git/blobdiff - o815/obs.cpp
Implemented startconfig.
[phys/latlib.git] / o815 / obs.cpp
index 70aa8b646a6c116b575c75a09bfc7bc16c224f4b..37d1d4ed7f3740f07a3b33684c0af8c24ddde2b4 100644 (file)
@@ -2,34 +2,42 @@
 
 #include "latlib/hypercache.h"
 
+#ifndef MPI_DISABLED
+#include <mpi.h>
+#endif
+
 void o815::obs::finish() {
   _finish();
 }
 
 void o815::obs::start() {
   if(O815->rank==0) {
-    *out << "#" << O815->programid << "-" << obsid << O815->headMaster() << endl << flush;
-    *out << "#" << O815->programid << "-" << obsid << O815->headMaster() << "-" << datadesc << endl << flush;
+    *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() {
-  _meas(true);
+void o815::obs::meas(bool loadedobs, const int& nthmeas) {
+  _meas(loadedobs, nthmeas);
 }
 
-o815::obs::obs(const string& _obsid, const string& _datadesc, o815 *_O815, const int& obsmemSize) {
+o815::obs::obs(const string& _obsid, const string& _datadesc, o815 *_O815, const int& obsmemSize, const string& _obsidpostfix) {
   obsid = _obsid;
+  obsidpostfix = _obsidpostfix;
   O815 = _O815;
   datadesc = _datadesc;
-  O815->out->newsub(obsid);
+  O815->out->newsub(obsid+obsidpostfix);
 
-  out = O815->out->out[obsid];
+  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);