00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
#ifndef _chemistry_qc_mbpt_distsh_h
00030
#define _chemistry_qc_mbpt_distsh_h
00031
00032
#ifdef __GNUC__
00033
#pragma interface
00034
#endif
00035
00036
#include <util/misc/regtime.h>
00037
#include <util/group/message.h>
00038
#include <util/group/thread.h>
00039
#include <chemistry/qc/basis/basis.h>
00040
00041
namespace sc {
00042
00044 class DistShellPair {
00045
private:
00046
Ref<MessageGrp> msg_;
00047
int nthread_;
00048
Ref<ThreadLock> lock_;
00049
Ref<GaussianBasisSet> basis_;
00050
int dynamic_;
00051
int debug_;
00052
int print_percent_;
00053
00054
00055
int req_type_;
00056
int ans_type_;
00057
int ncpu_less_0_;
00058
void serve_tasks();
00059
00060
00061
int S_, R_;
00062
int ncpu_;
00063
int mythread_;
00064
int ntask_;
00065
int print_interval_;
00066
int print_index_;
00067
public:
00068
DistShellPair(
const Ref<MessageGrp> &,
int nthread,
int mythread,
00069
const Ref<ThreadLock> &,
00070
const Ref<GaussianBasisSet> &);
00071 ~
DistShellPair();
00073
void init();
00075
void set_dynamic(
int d);
00077 void set_debug(
int d) { debug_ = d; }
00079 void set_print_percent(
int p) { print_percent_ = p; }
00084
int get_task(
int &P,
int &Q);
00085 };
00086
00087 }
00088
00089
#endif
00090
00091
00092
00093
00094
00095
00096