NAMD
ComputeCUDAMgr.h
Go to the documentation of this file.
1 #ifndef COMPUTECUDAMGR_H
2 #define COMPUTECUDAMGR_H
3 #include <vector>
4 #include "CudaUtils.h"
5 #include "ComputeCUDAMgr.decl.h"
6 #include "CudaNonbondedTables.h"
7 #include "CudaComputeNonbonded.h"
8 #include "CudaPmeSolverUtil.h"
9 #include "ComputeBondedCUDA.h"
10 #include <memory>
11 
12 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
13 
15 
16 class ComputeCUDAMgr : public CBase_ComputeCUDAMgr {
17 public:
18  // ComputeCUDAMgr_SDAG_CODE;
20  ComputeCUDAMgr(CkMigrateMessage *);
22  void initialize(CkQdMsg *msg);
23  void initialize_devices(CkQdMsg *msg);
24  void update();
28 #ifdef BONDED_CUDA
29  ComputeBondedCUDA* createComputeBondedCUDA(ComputeID c, ComputeMgr* computeMgr);
30  ComputeBondedCUDA* getComputeBondedCUDA();
31 #endif
34  std::shared_ptr<CudaGlobalMasterServer> createCudaGlobalMaster();
35  std::shared_ptr<CudaGlobalMasterServer> getCudaGlobalMaster();
36  double3** curSMDCOM;
37  double3*** curGrp1COM;
38  double3*** curGrp2COM;
39  std::atomic<int> reducerSMDDevice;
40  std::atomic<int> reducerGroupRestraintDevice;
41 private:
42 
43  // Number of CUDA devices on this node that are used in computation
44  int numDevices;
45  std::vector<CudaNonbondedTables*> cudaNonbondedTablesList;
46  std::vector<CudaComputeNonbonded*> cudaComputeNonbondedList;
47 #ifdef BONDED_CUDA
48  std::vector<ComputeBondedCUDA*> computeBondedCUDAList;
49 #endif
50  CudaPmeOneDevice* cudaPmeOneDevice;
51  std::shared_ptr<CudaGlobalMasterServer> cudaGlobalMasterObject;
52 
53 };
54 
55 #else // NAMD_CUDA
56 
57 class ComputeCUDAMgr : public CBase_ComputeCUDAMgr {
58 };
59 
60 #endif // NAMD_CUDA
61 #endif // COMPUTECUDAMGR_H
62 
std::shared_ptr< CudaGlobalMasterServer > getCudaGlobalMaster()
int32 ComputeID
Definition: NamdTypes.h:288
double3 ** curSMDCOM
void initialize(CkQdMsg *msg)
std::atomic< int > reducerSMDDevice
std::atomic< int > reducerGroupRestraintDevice
double3 *** curGrp2COM
static ComputeCUDAMgr * getComputeCUDAMgr()
double3 *** curGrp1COM
std::shared_ptr< CudaGlobalMasterServer > createCudaGlobalMaster()
void initialize_devices(CkQdMsg *msg)
CudaComputeNonbonded * getCudaComputeNonbonded()
CudaComputeNonbonded * createCudaComputeNonbonded(ComputeID c)
A class for copying atom information from SequencerCUDA to CudaGlobalMasterClient.
CudaPmeOneDevice * createCudaPmeOneDevice()
CudaPmeOneDevice * getCudaPmeOneDevice()