Skip to content

Conversation

@psychocoderHPC
Copy link
Member

@psychocoderHPC psychocoderHPC commented May 3, 2017

Add an explicit method to trigger that border data from the neighbor is gathered into the local guard of the GPU.

  • add method asyncCommunicationGather() (gather neighbor's border data)
  • add buffer for gather communication
  • define fieldTmpSupportGatherCommunication variable in memory.param to activate gather support for FieldTmp
  • remove method getCommTag()

Note

Currently the new method asyncCommunicationGather() is only available in FieldTmp but should be later also be ported to all other buffers like FieldE and FieldB. The best way to do this is to extend the PMacc GridBuffer to support asyncCommunicationScatter() and asyncCommunicationGather().
This is a bigger refactoring and should not be part of this pull request to allow a backport to the current release candidate 0.3.0.

@psychocoderHPC psychocoderHPC added component: core in PIConGPU (core application) feature labels May 3, 2017
@psychocoderHPC psychocoderHPC requested a review from ax3l May 3, 2017 09:02
@psychocoderHPC psychocoderHPC force-pushed the topic-fieldTmpGatherComm branch from b704d66 to cabc47f Compare May 3, 2017 09:12
@ax3l ax3l added this to the 0.3.0: Release Candidate milestone May 3, 2017

/** gather data from neighbor GPU
*
* copy data from the border of neighboring GPU into the local guard.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add missing information that there is no race condition if asyncCommunicationGather is called before or after asyncCommunication

Copy link
Member

@ax3l ax3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

little bug you found yourself and a few little comments for doc strings

*
* If `true` it is possible to call the method `asyncCommunicationGather()`
* to copy data from the border of neighboring GPU into the local guard.
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a bit more specific info: "This is also known as building up a "ghost" or "halo" region in domain decomposition and only necessary for specific algorithms that extend the basic PIC cyle, e.g. with dependence on derived density or energy fields."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh I see you tried if I copy&past your text without reading it^^ cyle must be cycle


virtual EventTask asyncCommunication( EventTask serialEvent );

/** gather data from neighbor GPU
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neighboring GPUs

{
/* guarding cells depend on direction
* for negative direction use originGuard else endGuard (relative direction ZERO is ignored)
* don't switch end and origin because this is a read buffer and no send buffer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and not a send buffer


EventTask FieldTmp::asyncCommunicationGather( EventTask serialEvent )
{
PMACC_VERIFY_MSG( fieldTmpSupportGatherCommunication == true, "fieldTmpSupportGatherCommunication in memory.param must be set to true" );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make me a two liner

PMACC_VERIFY_MSG( fieldTmpSupportGatherCommunication == true, "fieldTmpSupportGatherCommunication in memory.param must be set to true" );

if( fieldTmpRecv != nullptr )
m_gatherEv = fieldTmpRecv->asyncCommunication( m_scatterEv + m_gatherEv );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self-found by @psychocoderHPC : serialEvent needs to be handled here

@psychocoderHPC psychocoderHPC force-pushed the topic-fieldTmpGatherComm branch 2 times, most recently from e6bcf48 to 2c0e2cc Compare May 3, 2017 13:31
*
* If `true` it is possible to call the method `asyncCommunicationGather()`
* to copy data from the border of neighboring GPU into the local guard.
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot:

  • This is also known as building up a "ghost" or "halo" region in domain
  • decomposition and only necessary for specific algorithms that extend
  • the basic PIC cycle, e.g. with dependence on derived density or energy fields.


uint32_t getCommTag();

virtual EventTask asyncCommunication( EventTask serialEvent );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would make sense to add a doxygen string here now, too

define a variable in `memory.param` to activate gather support for `FieldTmp`
- add method `asyncCommunicationGather()` (gather neighbor border data)
- add buffer for gather communication
@psychocoderHPC psychocoderHPC force-pushed the topic-fieldTmpGatherComm branch from 2c0e2cc to 1c2bbab Compare May 3, 2017 14:55
@ax3l ax3l merged commit cdeae39 into ComputationalRadiationPhysics:dev May 4, 2017
@psychocoderHPC psychocoderHPC deleted the topic-fieldTmpGatherComm branch May 5, 2017 13:06
ax3l added a commit to ax3l/picongpu that referenced this pull request May 11, 2017
Adds the following changes to the `release-0.3.0` branch:

- Multiple ionizers per species:
  `ionizer< ... >` became a sequence of `ionizers< ... >` ComputationalRadiationPhysics#1999
- Thomas-Fermi:
  - fixes in domain decomposition ComputationalRadiationPhysics#2007
  - fixes compile issue (missing include) ComputationalRadiationPhysics#2003
- BSI models restructured ComputationalRadiationPhysics#2013
- ADK: fix effective principal quantum number `nEff` ComputationalRadiationPhysics#2011
- multiple ionization algorithms can be applied per species,
  e.g. cut-off barrier suppression ionization (BSI),
  probabilistic field ionization (ADK) and collisional ionization ComputationalRadiationPhysics#1999
- FieldTmp: Gather support to fill GUARD ComputationalRadiationPhysics#2009
- Fix undefined device variable in tilted laser pulse ComputationalRadiationPhysics#2017
- CompileTime Accessor: Type (::type) ComputationalRadiationPhysics#1998
- TBG Macros: Outdated Comment ComputationalRadiationPhysics#2004

Increases the state of the `0.3.0` release candidate to `rc3`.
ax3l added a commit to ax3l/picongpu that referenced this pull request May 11, 2017
Adds the following changes to the `release-0.3.0` branch:

- Multiple ionizers per species:
  `ionizer< ... >` became a sequence of `ionizers< ... >` ComputationalRadiationPhysics#1999
- Thomas-Fermi:
  - fixes in domain decomposition ComputationalRadiationPhysics#2007
  - fixes compile issue (missing include) ComputationalRadiationPhysics#2003
- BSI models restructured ComputationalRadiationPhysics#2013
- ADK: fix effective principal quantum number `nEff` ComputationalRadiationPhysics#2011
- multiple ionization algorithms can be applied per species,
  e.g. cut-off barrier suppression ionization (BSI),
  probabilistic field ionization (ADK) and collisional ionization ComputationalRadiationPhysics#1999
- FieldTmp: Gather support to fill GUARD ComputationalRadiationPhysics#2009
- Fix undefined device variable in tilted laser pulse ComputationalRadiationPhysics#2017
- CompileTime Accessor: Type (::type) ComputationalRadiationPhysics#1998
- TBG Macros: Outdated Comment ComputationalRadiationPhysics#2004

Increases the state of the `0.3.0` release candidate to `rc3`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: core in PIConGPU (core application)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants