Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

12/distsh.h

00001 //
00002 // distsh.h
00003 // based on mbpt/distsh.h
00004 //
00005 // Copyright (C) 1996 Limit Point Systems, Inc.
00006 //
00007 // Author: Ida Nielsen <ida@kemi.aau.dk>
00008 // Maintainer: LPS
00009 //
00010 // This file is part of the SC Toolkit.
00011 //
00012 // The SC Toolkit is free software; you can redistribute it and/or modify
00013 // it under the terms of the GNU Library General Public License as published by
00014 // the Free Software Foundation; either version 2, or (at your option)
00015 // any later version.
00016 //
00017 // The SC Toolkit is distributed in the hope that it will be useful,
00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 // GNU Library General Public License for more details.
00021 //
00022 // You should have received a copy of the GNU Library General Public License
00023 // along with the SC Toolkit; see the file COPYING.LIB.  If not, write to
00024 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
00025 //
00026 // The U.S. Government is granted a limited license as per AL 91-7.
00027 //
00028 
00029 #ifndef _chemistry_qc_mbptr12_distsh_h
00030 #define _chemistry_qc_mbptr12_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 DistShellPairR12 {
00045   private:
00046     Ref<MessageGrp> msg_;
00047     int nthread_;
00048     Ref<ThreadLock> lock_;
00049     Ref<GaussianBasisSet> bs1_;
00050     Ref<GaussianBasisSet> bs2_;
00051     bool bs1_eq_bs2_;
00052     int dynamic_;
00053     int debug_;
00054     int print_percent_;
00055 
00056     // for dynamic load balancing
00057     int req_type_;
00058     int ans_type_;
00059     int ncpu_less_0_;
00060     void serve_tasks();
00061 
00062     // for static load balancing
00063     int S_, R_;
00064     int ncpu_;
00065     int incS_, incR_;
00066     int mythread_;
00067     int ntask_;
00068     int print_interval_;
00069     int print_index_;
00070   public:
00076     DistShellPairR12(const Ref<MessageGrp> &, int nthread, int mythread,
00077                   const Ref<ThreadLock>& lock,
00078                   const Ref<GaussianBasisSet>& bs1, const Ref<GaussianBasisSet>& bs2);
00079     ~DistShellPairR12();
00081     void init();
00083     void set_dynamic(int d);
00085     void set_debug(int d) { debug_ = d; }
00087     void set_print_percent(int p) { print_percent_ = p; }
00095     int get_task(int &P, int &Q);
00096 };
00097 
00098 }
00099 
00100 #endif
00101 
00102 // //////////////////////////////////////////////////////////////////////////
00103 
00104 // Local Variables:
00105 // mode: c++
00106 // c-file-style: "CLJ-CONDENSED"
00107 // End:

Generated at Mon Nov 29 08:41:51 2004 for MPQC 2.2.2 using the documentation package Doxygen 1.3.9.1.