source: src/Fragmentation/Automation/MPQCFragmentController.hpp@ 6294b6

Candidate_v1.7.0 stable
Last change on this file since 6294b6 was 6294b6, checked in by Frederik Heber <frederik.heber@…>, 3 months ago

MPQCJob mutes output on verbosity level 0 and unmutes else.

  • we redirect stdout to /dev/null when verbose level of 0 is set.
  • passing on verbosity level to MPQCJob.
  • Tested that the verbosity can be changed per executed job and will not be touched with a job of the same verbosity level.
  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*
2 * MPQCFragmentController.hpp
3 *
4 * Created on: Aug 27, 2012
5 * Author: heber
6 */
7
8#ifndef MPQCFRAGMENTCONTROLLER_HPP_
9#define MPQCFRAGMENTCONTROLLER_HPP_
10
11
12// include config.h
13#ifdef HAVE_CONFIG_H
14#include <config.h>
15#endif
16
17#include "Fragmentation/Automation/SpecificFragmentController.hpp"
18
19#include <boost/filesystem/path.hpp>
20
21#include <fstream>
22#include <string>
23#include <vector>
24
25#include "JobMarket/types.hpp"
26
27#include "Fragmentation/Summation/Containers/MPQCData.hpp"
28
29/** This class uses SpecificFragmentController with functions to add specificly
30 * VMGJobs.
31 */
32class MPQCFragmentController : public SpecificFragmentController
33{
34public:
35 MPQCFragmentController(boost::asio::io_service &io_service) :
36 SpecificFragmentController(io_service)
37 {}
38 virtual ~MPQCFragmentController()
39 {}
40
41 /** Command Controller to fill its hold of jobs from FragmentJobQueue.
42 *
43 * \param _DoSampleDensity whether to actually sample the resulting electronic density
44 * \param _DoValenceOnly whether to sample just the valence or the total elctron and nuclei density
45 * \return true - jobs obtained, false - queue empty
46 */
47 bool addJobsFromQueue(
48 const MPQCData::DoLongrange_t _DoLongrange,
49 const MPQCData::DoValenceOnly_t _DoValenceOnly,
50 const int _verbose
51 );
52
53 void waitforResults(const size_t NoExpectedResults)
54 { results.waitforResults(NoExpectedResults, io_service, *this); }
55
56 /** Get results map of calculated jobs.
57 *
58 * \param fragmentData contains map of results on output
59 */
60 void getResults(std::map<JobId_t, MPQCData> &fragmentData) {
61 fragmentData = results.IdData;
62 results.clear();
63 }
64
65 /** Runs the service.
66 *
67 * Here, we finalize each job's id and push them to the server.
68 */
69 void run();
70
71private:
72 //!> type-specific result container
73 SpecificFragmentController::ReceiveResultContainer<MPQCData> results;
74};
75
76
77#endif /* MPQCFRAGMENTCONTROLLER_HPP_ */
Note: See TracBrowser for help on using the repository browser.