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
RevLine 
[28e894]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
[1dfe00]19#ifdef HAVE_JOBMARKET
[28e894]20#include "JobMarket/Jobs/FragmentJob.hpp"
[1dfe00]21#else
22#include "Jobs/JobMarket/FragmentJob.hpp"
23#endif
[28e894]24
[fbf143]25#include "Fragmentation/Summation/SetValues/SamplingGridProperties.hpp"
26#include "Fragmentation/Summation/Containers/MPQCData.hpp"
[28c025]27
[28e894]28#include <string>
29
30/** This class encapsulates a MPQC Job.
31 *
32 */
33class MPQCJob : public FragmentJob
34{
35public:
[d12d621]36 MPQCJob(
37 const JobId_t _JobId,
38 const std::string &_inputfile,
[ec1aae]39 const double _begin[NDIM],
40 const double _end[NDIM],
[6294b6]41 const int _level,
42 const int _verbose);
[a9558f]43 virtual ~MPQCJob();
[28e894]44
45 FragmentResult::ptr Work();
46
[503acc1]47 //!> whether to actually sample the density
48 MPQCData::DoLongrange_t DoLongrange;
49
[6ff62c]50 //!> whether to sample just the valence or the total electron and nuclei density
51 MPQCData::DoValenceOnly_t DoValenceOnly;
52
[6294b6]53 //!> verbosity level of mpqc: 0 will mute all std out
54 int verbose;
55
[28e894]56private:
[28c025]57 //!> contents of inputfile
[28e894]58 const std::string inputfile;
[28c025]59 //!> information for how to sample the density
60 const SamplingGridProperties grid;
[28e894]61
62private:
63 /** private default cstor for serialization only
64 */
[a9558f]65 MPQCJob();
[28e894]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);
[503acc1]73 ar & DoLongrange;
[6ff62c]74 ar & DoValenceOnly;
[6294b6]75 ar & verbose;
[28e894]76 ar & const_cast<std::string &>(inputfile);
[28c025]77 ar & const_cast<SamplingGridProperties &>(grid);
[28e894]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.