ComputeMgr.C File Reference

#include "InfoStream.h"
#include "ProcessorPrivate.h"
#include "Debug.h"
#include "BOCgroup.h"
#include "ComputeMgr.decl.h"
#include "ComputeMgr.h"
#include "ProxyMgr.decl.h"
#include "ProxyMgr.h"
#include "Node.h"
#include "ComputeMap.h"
#include "PatchMap.h"
#include "PatchMap.inl"
#include "Compute.h"
#include "ComputeNonbondedUtil.h"
#include "ComputeNonbondedSelf.h"
#include "ComputeNonbondedPair.h"
#include "ComputeNonbondedCUDA.h"
#include "ComputeNonbondedMIC.h"
#include "ComputeAngles.h"
#include "ComputeDihedrals.h"
#include "ComputeImpropers.h"
#include "ComputeThole.h"
#include "ComputeAniso.h"
#include "ComputeCrossterms.h"
#include "ComputeGromacsPair.h"
#include "ComputeBonds.h"
#include "ComputeNonbondedCUDAExcl.h"
#include "ComputeFullDirect.h"
#include "ComputeGlobal.h"
#include "ComputeGlobalMsgs.h"
#include "ComputeExt.h"
#include "ComputeQM.h"
#include "ComputeGBISser.h"
#include "ComputeLCPO.h"
#include "ComputeFmmSerial.h"
#include "ComputeMsmSerial.h"
#include "ComputeMsmMsa.h"
#include "ComputeMsm.h"
#include "ComputeDPMTA.h"
#include "ComputeDPME.h"
#include "ComputeDPMEMsgs.h"
#include "ComputePme.h"
#include "ComputePmeCUDA.h"
#include "ComputeCUDAMgr.h"
#include "CudaComputeNonbonded.h"
#include "ComputePmeCUDAMgr.h"
#include "ComputeEwald.h"
#include "ComputeEField.h"
#include "ComputeGridForce.h"
#include "ComputeStir.h"
#include "ComputeSphericalBC.h"
#include "ComputeCylindricalBC.h"
#include "ComputeTclBC.h"
#include "ComputeRestraints.h"
#include "ComputeConsForce.h"
#include "ComputeConsForceMsgs.h"
#include "WorkDistrib.h"
#include "LdbCoordinator.h"
#include "FreeEnergyEnums.h"
#include "FreeEnergyAssert.h"
#include "FreeEnergyGroup.h"
#include "FreeEnergyVector.h"
#include "FreeEnergyRestrain.h"
#include "FreeEnergyRMgr.h"
#include "FreeEnergyLambda.h"
#include "FreeEnergyLambdMgr.h"
#include "GlobalMasterTest.h"
#include "GlobalMasterIMD.h"
#include "GlobalMasterTcl.h"
#include "GlobalMasterSMD.h"
#include "GlobalMasterTMD.h"
#include "GlobalMasterSymmetry.h"
#include "GlobalMasterEasy.h"
#include "GlobalMasterMisc.h"
#include "GlobalMasterFreeEnergy.h"
#include "GlobalMasterColvars.h"
#include "ComputeNonbondedMICKernel.h"
#include "DeviceCUDA.h"
#include "ComputeMgr.def.h"

Go to the source code of this file.

Classes

class  NonbondedCUDASlaveMsg
class  NonbondedCUDASkipMsg
class  NonbondedMICSlaveMsg
class  CudaComputeNonbondedMsg
class  NonbondedMICSkipMsg

Defines

#define MIN_DEBUG_LEVEL   1

Functions

CudaComputeNonbondedgetCudaComputeNonbonded ()
CudaComputeNonbondedcreateCudaComputeNonbonded (ComputeID c)
void registerUserEventsForAllComputeObjs ()
void build_cuda_exclusions ()
void build_cuda_force_table ()
int isMICProcessor (int pe)

Variables

__thread DeviceCUDAdeviceCUDA

Define Documentation

#define MIN_DEBUG_LEVEL   1

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 11 of file ComputeMgr.C.


Function Documentation

void build_cuda_exclusions (  ) 

Definition at line 248 of file ComputeNonbondedCUDA.C.

References ComputeNonbondedCUDA::build_exclusions(), deviceCUDA, and DeviceCUDA::getMasterPe().

Referenced by ComputeMgr::recvBuildCudaExclusions().

00248                              {
00249   if ( deviceCUDA->getMasterPe() != CkMyPe() ) return;
00250   ComputeNonbondedCUDA::build_exclusions();
00251 }

void build_cuda_force_table (  ) 
CudaComputeNonbonded* createCudaComputeNonbonded ( ComputeID  c  ) 
CudaComputeNonbonded* getCudaComputeNonbonded (  ) 
int isMICProcessor ( int  pe  ) 

Definition at line 1881 of file ComputeMgr.C.

01881                            {
01882   return CProxy_ComputeMgr::ckLocalBranch(CkpvAccess(BOCclass_group).computeMgr)->isMICProcessor(pe);
01883 }

void registerUserEventsForAllComputeObjs ( void   ) 

Definition at line 830 of file ComputeMgr.C.

References computeAnglesType, computeAnisoType, computeBondsType, computeConsForceType, computeConsTorqueType, computeCrosstermsType, computeCylindricalBCType, computeDihedralsType, computeEFieldType, computeEwaldType, computeExclsType, computeExtType, computeFullDirectType, computeGlobalType, computeGridForceType, computeImpropersType, computeLCPOType, computeNonbondedPairType, computeNonbondedSelfType, computePmeCUDAType, computePmeType, computeQMType, computeRestraintsType, computeSelfAnglesType, computeSelfAnisoType, computeSelfBondsType, computeSelfCrosstermsType, computeSelfDihedralsType, computeSelfExclsType, computeSelfImpropersType, computeSelfTholeType, computeSphericalBCType, computeStirType, computeTclBCType, computeTholeType, PatchMap::gridsize_a(), PatchMap::gridsize_b(), PatchMap::gridsize_c(), PatchMap::index_a(), PatchMap::index_b(), PatchMap::index_c(), NAMD_bug(), ComputeMap::numComputes(), PatchMap::Object(), ComputeMap::Object(), Lattice::offset_a(), Lattice::offset_b(), Lattice::offset_c(), ComputeMap::pid(), TRACE_COMPOBJ_IDOFFSET, ComputeMap::trans(), and ComputeMap::type().

Referenced by Node::startup().

00831 {
00832 #ifdef TRACE_COMPUTE_OBJECTS
00833     ComputeMap *map = ComputeMap::Object();
00834     PatchMap *pmap = PatchMap::Object();     
00835     char user_des[50];
00836     int p1, p2;
00837     int adim, bdim, cdim;
00838     int t1, t2;
00839     int x1, y1, z1, x2, y2, z2;
00840     int dx, dy, dz;
00841     for (int i=0; i<map->numComputes(); i++)
00842     {
00843         memset(user_des, 0, 50);
00844         switch ( map->type(i) )
00845         {
00846         case computeNonbondedSelfType:
00847             sprintf(user_des, "computeNonBondedSelfType_%d_pid_%d", i, map->pid(i,0));
00848             break;
00849         case computeLCPOType:
00850             sprintf(user_des, "computeLCPOType_%d_pid_%d", i, map->pid(i,0));
00851             break;
00852         case computeNonbondedPairType:
00853             adim = pmap->gridsize_a();
00854             bdim = pmap->gridsize_b();
00855             cdim = pmap->gridsize_c();
00856             p1 = map->pid(i, 0);
00857             t1 = map->trans(i, 0);
00858             x1 = pmap->index_a(p1) + adim * Lattice::offset_a(t1);
00859             y1 = pmap->index_b(p1) + bdim * Lattice::offset_b(t1);
00860             z1 = pmap->index_c(p1) + cdim * Lattice::offset_c(t1);
00861             p2 = map->pid(i, 1);
00862             t2 = map->trans(i, 1);
00863             x2 = pmap->index_a(p2) + adim * Lattice::offset_a(t2);
00864             y2 = pmap->index_b(p2) + bdim * Lattice::offset_b(t2);
00865             z2 = pmap->index_c(p2) + cdim * Lattice::offset_c(t2);
00866             dx = abs(x1-x2);
00867             dy = abs(y1-y2);
00868             dz = abs(z1-z2);
00869             sprintf(user_des, "computeNonBondedPairType_%d(%d,%d,%d)", i, dx,dy,dz);
00870             break;
00871 #ifdef NAMD_CUDA
00872 #ifdef BONDED_CUDA
00873         case computeBondedCUDAType:
00874             sprintf(user_des, "computeBondedCUDAType_%d", i);
00875             break;
00876 #endif
00877 #endif
00878         case computeExclsType:
00879             sprintf(user_des, "computeExclsType_%d", i);
00880             break;
00881         case computeBondsType:
00882             sprintf(user_des, "computeBondsType_%d", i);
00883             break;
00884         case computeAnglesType:
00885             sprintf(user_des, "computeAnglesType_%d", i);
00886             break;
00887         case computeDihedralsType:
00888             sprintf(user_des, "computeDihedralsType_%d", i);
00889             break;
00890         case computeImpropersType:
00891             sprintf(user_des, "computeImpropersType_%d", i);
00892             break;
00893         case computeTholeType:
00894             sprintf(user_des, "computeTholeType_%d", i);
00895             break;
00896         case computeAnisoType:
00897             sprintf(user_des, "computeAnisoType_%d", i);
00898             break;
00899         case computeCrosstermsType:
00900             sprintf(user_des, "computeCrosstermsType_%d", i);
00901             break;
00902         case computeSelfExclsType:
00903             sprintf(user_des, "computeSelfExclsType_%d", i);
00904             break;
00905         case computeSelfBondsType:
00906             sprintf(user_des, "computeSelfBondsType_%d", i);
00907             break;
00908         case computeSelfAnglesType:
00909             sprintf(user_des, "computeSelfAnglesType_%d", i);
00910             break;
00911         case computeSelfDihedralsType:
00912             sprintf(user_des, "computeSelfDihedralsType_%d", i);
00913             break;
00914         case computeSelfImpropersType:
00915             sprintf(user_des, "computeSelfImpropersType_%d", i);
00916             break;
00917         case computeSelfTholeType:
00918             sprintf(user_des, "computeSelfTholeType_%d", i);
00919             break;
00920         case computeSelfAnisoType:
00921             sprintf(user_des, "computeSelfAnisoType_%d", i);
00922             break;
00923         case computeSelfCrosstermsType:
00924             sprintf(user_des, "computeSelfCrosstermsType_%d", i);
00925             break;
00926 #ifdef DPMTA
00927         case computeDPMTAType:
00928             sprintf(user_des, "computeDPMTAType_%d", i);
00929             break;
00930 #endif
00931 #ifdef DPME
00932         case computeDPMEType:
00933             sprintf(user_des, "computeDPMEType_%d", i);
00934             break;
00935 #endif
00936         case computePmeType:
00937             sprintf(user_des, "computePMEType_%d", i);
00938             break;
00939 #ifdef NAMD_CUDA
00940         case computePmeCUDAType:
00941             sprintf(user_des, "computePMECUDAType_%d", i);
00942             break;
00943 #endif
00944         case computeEwaldType:
00945             sprintf(user_des, "computeEwaldType_%d", i);
00946             break;
00947         case computeFullDirectType:
00948             sprintf(user_des, "computeFullDirectType_%d", i);
00949             break;
00950         case computeGlobalType:
00951             sprintf(user_des, "computeGlobalType_%d", i);
00952             break;
00953         case computeStirType:
00954             sprintf(user_des, "computeStirType_%d", i);
00955             break;
00956         case computeExtType:
00957             sprintf(user_des, "computeExtType_%d", i);
00958             break;
00959         case computeQMType:
00960             sprintf(user_des, "computeQMType_%d", i);
00961             break;
00962         case computeEFieldType:
00963             sprintf(user_des, "computeEFieldType_%d", i);
00964             break;
00965             /* BEGIN gf */
00966         case computeGridForceType:
00967             sprintf(user_des, "computeGridForceType_%d", i);
00968             break;
00969             /* END gf */
00970         case computeSphericalBCType:
00971             sprintf(user_des, "computeSphericalBCType_%d", i);
00972             break;
00973         case computeCylindricalBCType:
00974             sprintf(user_des, "computeCylindricalBCType_%d", i);
00975             break;
00976         case computeTclBCType:
00977             sprintf(user_des, "computeTclBCType_%d", i);
00978             break;
00979         case computeRestraintsType:
00980             sprintf(user_des, "computeRestraintsType_%d", i);
00981             break;
00982         case computeConsForceType:
00983             sprintf(user_des, "computeConsForceType_%d", i);
00984             break;
00985         case computeConsTorqueType:
00986             sprintf(user_des, "computeConsTorqueType_%d", i);
00987             break;
00988         default:
00989             NAMD_bug("Unknown compute type in ComputeMgr::registerUserEventForAllComputeObjs().");
00990             break;
00991         }
00992         int user_des_len = strlen(user_des);
00993         char *user_des_cst = new char[user_des_len+1];
00994         memcpy(user_des_cst, user_des, user_des_len);
00995         user_des_cst[user_des_len] = 0;
00996         //Since the argument in traceRegisterUserEvent is supposed
00997         //to be a const string which will not be copied inside the
00998         //function when a new user event is created, user_des_cst 
00999         //has to be allocated in heap.
01000         int reEvenId = traceRegisterUserEvent(user_des_cst, TRACE_COMPOBJ_IDOFFSET+i);
01001         //printf("Register user event (%s) with id (%d)\n", user_des, reEvenId);
01002     }
01003 #else
01004     return;
01005 #endif
01006 }


Variable Documentation

Definition at line 18 of file DeviceCUDA.C.


Generated on 19 Sep 2020 for NAMD by  doxygen 1.6.1