NAMD
Public Member Functions | Public Attributes | Friends | List of all members
NodePmeMgr Class Reference
Inheritance diagram for NodePmeMgr:

Public Member Functions

 NodePmeMgr ()
 
 ~NodePmeMgr ()
 
void initialize ()
 
void sendDataHelper (int)
 
void sendPencilsHelper (int)
 
void recvTrans (PmeTransMsg *)
 
void recvUntrans (PmeUntransMsg *)
 
void registerXPencil (CkArrayIndex3D, PmeXPencil *)
 
void registerYPencil (CkArrayIndex3D, PmeYPencil *)
 
void registerZPencil (CkArrayIndex3D, PmeZPencil *)
 
void recvXTrans (PmeTransMsg *)
 
void recvYTrans (PmeTransMsg *)
 
void recvYUntrans (PmeUntransMsg *)
 
void recvZGrid (PmeGridMsg *)
 
void recvZUntrans (PmeUntransMsg *)
 
void recvUngrid (PmeGridMsg *)
 
void recvPencilMapProxies (CProxy_PmePencilMap _xm, CProxy_PmePencilMap _ym, CProxy_PmePencilMap _zm)
 

Public Attributes

CProxy_PmePencilMap xm
 
CProxy_PmePencilMap ym
 
CProxy_PmePencilMap zm
 

Friends

class ComputePmeMgr
 
class ComputePme
 

Detailed Description

Definition at line 613 of file ComputePme.C.

Constructor & Destructor Documentation

NodePmeMgr::NodePmeMgr ( )

Definition at line 664 of file ComputePme.C.

664  {
665  mgrObjects = new ComputePmeMgr*[CkMyNodeSize()];
666 }
NodePmeMgr::~NodePmeMgr ( )

Definition at line 668 of file ComputePme.C.

668  {
669  delete [] mgrObjects;
670 }

Member Function Documentation

void NodePmeMgr::initialize ( void  )

Definition at line 672 of file ComputePme.C.

672  {
673  CProxy_ComputePmeMgr proxy = CkpvAccess(BOCclass_group).computePmeMgr;
674  mgrObjects[CkMyRank()] = proxy.ckLocalBranch();
675  if ( CkMyRank() == 0 ) {
676  mgrProxy = proxy;
677  mgrObject = proxy.ckLocalBranch();
678  }
679 }
void NodePmeMgr::recvPencilMapProxies ( CProxy_PmePencilMap  _xm,
CProxy_PmePencilMap  _ym,
CProxy_PmePencilMap  _zm 
)
inline

Definition at line 635 of file ComputePme.C.

635  {
636  xm=_xm; ym=_ym; zm=_zm;
637  }
CProxy_PmePencilMap zm
Definition: ComputePme.C:640
CProxy_PmePencilMap xm
Definition: ComputePme.C:638
CProxy_PmePencilMap ym
Definition: ComputePme.C:639
void NodePmeMgr::recvTrans ( PmeTransMsg msg)

Definition at line 681 of file ComputePme.C.

681  {
682  mgrObject->fwdSharedTrans(msg);
683 }
void fwdSharedTrans(PmeTransMsg *)
Definition: ComputePme.C:2020
void NodePmeMgr::recvUngrid ( PmeGridMsg msg)

Definition at line 689 of file ComputePme.C.

References NAMD_bug().

689  {
690 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
691  masterPmeMgr->recvUngrid(msg);
692 #else
693  NAMD_bug("NodePmeMgr::recvUngrid called in non-CUDA build.");
694 #endif
695 }
void recvUngrid(PmeGridMsg *)
Definition: ComputePme.C:2435
void NAMD_bug(const char *err_msg)
Definition: common.C:129
void NodePmeMgr::recvUntrans ( PmeUntransMsg msg)

Definition at line 685 of file ComputePme.C.

685  {
686  mgrObject->fwdSharedUntrans(msg);
687 }
void fwdSharedUntrans(PmeUntransMsg *)
Definition: ComputePme.C:2276
void NodePmeMgr::recvXTrans ( PmeTransMsg msg)

Definition at line 4987 of file ComputePme.C.

References PmeTransMsg::destElem, and PmeXPencil::node_process_trans().

4987  {
4988  // CkPrintf("[%d] NodePmeMgr recvXTrans for %d %d %d\n",CkMyPe(),msg->destElem.index[0],msg->destElem.index[1],msg->destElem.index[2]);
4989  PmeXPencil *target=xPencilObj.get(msg->destElem);
4990 #if DEBUG_NODE_PAR_RECV
4991  if(target == NULL)
4992  CkAbort("xpencil in recvXTrans not found, debug registeration");
4993 #endif
4994  target->node_process_trans(msg);
4995  delete msg;
4996 }
CkArrayIndex3D destElem
Definition: ComputePme.C:144
void node_process_trans(PmeTransMsg *)
Definition: ComputePme.C:5602
void NodePmeMgr::recvYTrans ( PmeTransMsg msg)

Definition at line 4999 of file ComputePme.C.

References PmeTransMsg::destElem, and PmeYPencil::node_process_trans().

4999  {
5000  // CkPrintf("[%d] NodePmeMgr recvYTrans for %d %d %d\n",CkMyPe(),msg->destElem.index[0],msg->destElem.index[1],msg->destElem.index[2]);
5001  PmeYPencil *target=yPencilObj.get(msg->destElem);
5002 #if DEBUG_NODE_PAR_RECV
5003  if(target == NULL)
5004  CkAbort("ypencil in recvYTrans not found, debug registeration");
5005 #endif
5006  target->node_process_trans(msg);
5007  delete msg;
5008  }
void node_process_trans(PmeTransMsg *)
Definition: ComputePme.C:4942
CkArrayIndex3D destElem
Definition: ComputePme.C:144
void NodePmeMgr::recvYUntrans ( PmeUntransMsg msg)

Definition at line 5009 of file ComputePme.C.

References PmeUntransMsg::destElem, and PmeYPencil::node_process_untrans().

5009  {
5010  // CkPrintf("[%d] NodePmeMgr recvYUntrans for %d %d %d\n",CkMyPe(),msg->destElem.index[0],msg->destElem.index[1],msg->destElem.index[2]);
5011  PmeYPencil *target=yPencilObj.get(msg->destElem);
5012 #if DEBUG_NODE_PAR_RECV
5013  if(target == NULL)
5014  CkAbort("ypencil in recvYUntrans not found, debug registeration");
5015 #endif
5016  target->node_process_untrans(msg);
5017  delete msg;
5018  }
void node_process_untrans(PmeUntransMsg *)
Definition: ComputePme.C:4965
CkArrayIndex3D destElem
Definition: ComputePme.C:161
void NodePmeMgr::recvZGrid ( PmeGridMsg msg)

Definition at line 5030 of file ComputePme.C.

References PmeGridMsg::destElem, and PmeZPencil::node_process_grid().

5030  {
5031  //CkPrintf("[%d] NodePmeMgr %p recvGrid for %d %d %d\n",CkMyPe(),this,msg->destElem.index[0],msg->destElem.index[1],msg->destElem.index[2]);
5032  PmeZPencil *target=zPencilObj.get(msg->destElem);
5033 #if DEBUG_NODE_PAR_RECV
5034  if(target == NULL){
5035  CkAbort("zpencil in recvZGrid not found, debug registeration");
5036  }
5037 #endif
5038  target->node_process_grid(msg); //msg is stored inside node_proces_grid
5039 }
void node_process_grid(PmeGridMsg *)
Definition: ComputePme.C:6296
CkArrayIndex3D destElem
Definition: ComputePme.C:131
void NodePmeMgr::recvZUntrans ( PmeUntransMsg msg)

Definition at line 5019 of file ComputePme.C.

References PmeUntransMsg::destElem, and PmeZPencil::node_process_untrans().

5019  {
5020  //CkPrintf("[%d] NodePmeMgr recvZUntrans for %d %d %d\n",CkMyPe(),msg->destElem.index[0],msg->destElem.index[1],msg->destElem.index[2]);
5021  PmeZPencil *target=zPencilObj.get(msg->destElem);
5022 #if DEBUG_NODE_PAR_RECV
5023  if(target == NULL)
5024  CkAbort("zpencil in recvZUntrans not found, debug registeration");
5025 #endif
5026  target->node_process_untrans(msg);
5027  delete msg;
5028 }
void node_process_untrans(PmeUntransMsg *)
Definition: ComputePme.C:6331
CkArrayIndex3D destElem
Definition: ComputePme.C:161
void NodePmeMgr::registerXPencil ( CkArrayIndex3D  idx,
PmeXPencil obj 
)

Definition at line 697 of file ComputePme.C.

References ComputePmeMgr::fftw_plan_lock.

698 {
700  xPencilObj.put(idx)=obj;
702 }
static CmiNodeLock fftw_plan_lock
Definition: ComputePme.C:420
void NodePmeMgr::registerYPencil ( CkArrayIndex3D  idx,
PmeYPencil obj 
)

Definition at line 703 of file ComputePme.C.

References ComputePmeMgr::fftw_plan_lock.

704 {
706  yPencilObj.put(idx)=obj;
708 }
static CmiNodeLock fftw_plan_lock
Definition: ComputePme.C:420
void NodePmeMgr::registerZPencil ( CkArrayIndex3D  idx,
PmeZPencil obj 
)

Definition at line 709 of file ComputePme.C.

References ComputePmeMgr::fftw_plan_lock.

710 {
712  zPencilObj.put(idx)=obj;
714 }
static CmiNodeLock fftw_plan_lock
Definition: ComputePme.C:420
void NodePmeMgr::sendDataHelper ( int  iter)

Definition at line 3955 of file ComputePme.C.

References NAMD_bug(), ComputePmeMgr::sendDataHelper_errors, ComputePmeMgr::sendDataHelper_lattice, ComputePmeMgr::sendDataHelper_sequence, ComputePmeMgr::sendDataHelper_sourcepe, and ComputePmeMgr::sendDataPart().

Referenced by ComputePmeMgr::sendDataHelper().

3955  {
3956 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
3957  ComputePmeMgr *obj = masterPmeMgr;
3959 #else
3960  NAMD_bug("NodePmeMgr::sendDataHelper called in non-CUDA build");
3961 #endif
3962 }
int sendDataHelper_sequence
Definition: ComputePme.C:377
void NAMD_bug(const char *err_msg)
Definition: common.C:129
int sendDataHelper_sourcepe
Definition: ComputePme.C:378
Lattice * sendDataHelper_lattice
Definition: ComputePme.C:376
int sendDataHelper_errors
Definition: ComputePme.C:379
void sendDataPart(int first, int last, Lattice &, int sequence, int sourcepe, int errors)
Definition: ComputePme.C:3842
void NodePmeMgr::sendPencilsHelper ( int  iter)

Definition at line 3728 of file ComputePme.C.

References NAMD_bug(), ComputePmeMgr::sendDataHelper_lattice, ComputePmeMgr::sendDataHelper_sequence, ComputePmeMgr::sendDataHelper_sourcepe, and ComputePmeMgr::sendPencilsPart().

Referenced by ComputePmeMgr::sendPencilsHelper().

3728  {
3729 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
3730  ComputePmeMgr *obj = masterPmeMgr;
3732 #else
3733  NAMD_bug("NodePmeMgr::sendPencilsHelper called in non-CUDA build");
3734 #endif
3735 }
int sendDataHelper_sequence
Definition: ComputePme.C:377
void NAMD_bug(const char *err_msg)
Definition: common.C:129
int sendDataHelper_sourcepe
Definition: ComputePme.C:378
Lattice * sendDataHelper_lattice
Definition: ComputePme.C:376
void sendPencilsPart(int first, int last, Lattice &, int sequence, int sourcepe)
Definition: ComputePme.C:3582

Friends And Related Function Documentation

friend class ComputePme
friend

Definition at line 616 of file ComputePme.C.

friend class ComputePmeMgr
friend

Definition at line 615 of file ComputePme.C.

Member Data Documentation

CProxy_PmePencilMap NodePmeMgr::xm

Definition at line 638 of file ComputePme.C.

CProxy_PmePencilMap NodePmeMgr::ym

Definition at line 639 of file ComputePme.C.

CProxy_PmePencilMap NodePmeMgr::zm

Definition at line 640 of file ComputePme.C.

Referenced by ComputePmeMgr::sendPencils(), and ComputePmeMgr::sendPencilsPart().


The documentation for this class was generated from the following file: