source: src/Jobs/MPQCJob.hpp@ 91c409

Candidate_v1.7.0 stable
Last change on this file since 91c409 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 * MPQCJob.hpp
3 *
4 * Created on: Jul 10, 2012
5 * Author: heber
6 */
7
8#ifndef MPQCJOB_HPP_
9#define MPQCJOB_HPP_
10
11
12// include config.h
13#ifdef HAVE_CONFIG_H
14#include <config.h>
15#endif
16
17#include "boost/serialization/export.hpp"
18
19#ifdef HAVE_JOBMARKET
20#include "JobMarket/Jobs/FragmentJob.hpp"
21#else
22#include "Jobs/JobMarket/FragmentJob.hpp"
23#endif
24
25#include "Fragmentation/Summation/SetValues/SamplingGridProperties.hpp"
26#include "Fragmentation/Summation/Containers/MPQCData.hpp"
27
28#include <string>
29
30/** This class encapsulates a MPQC Job.
31 *
32 */
33class MPQCJob : public FragmentJob
34{
35public:
36 MPQCJob(
37 const JobId_t _JobId,
38 const std::string &_inputfile,
39 const double _begin[NDIM],
40 const double _end[NDIM],
41 const int _level,
42 const int _verbose);
43 virtual ~MPQCJob();
44
45 FragmentResult::ptr Work();
46
47 //!> whether to actually sample the density
48 MPQCData::DoLongrange_t DoLongrange;
49
50 //!> whether to sample just the valence or the total electron and nuclei density
51 MPQCData::DoValenceOnly_t DoValenceOnly;
52
53 //!> verbosity level of mpqc: 0 will mute all std out
54 int verbose;
55
56private:
57 //!> contents of inputfile
58 const std::string inputfile;
59 //!> information for how to sample the density
60 const SamplingGridProperties grid;
61
62private:
63 /** private default cstor for serialization only
64 */
65 MPQCJob();
66
67 friend class boost::serialization::access;
68 // serialization
69 template <typename Archive>
70 void serialize(Archive& ar, const unsigned int version)
71 {
72 ar & boost::serialization::base_object<FragmentJob>(*this);
73 ar & DoLongrange;
74 ar & DoValenceOnly;
75 ar & verbose;
76 ar & const_cast<std::string &>(inputfile);
77 ar & const_cast<SamplingGridProperties &>(grid);
78 }
79};
80
81// we need to give this class a unique key for serialization
82// its is only serialized through its base class FragmentJob
83BOOST_CLASS_EXPORT_KEY(MPQCJob)
84
85#endif /* MPQCJOB_HPP_ */
Note: See TracBrowser for help on using the repository browser.