Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 395
    • Issues 395
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #2375

Closed
Open
Created Feb 22, 2022 by Mark Olesen@markMaintainer

inconsistency in documentation or implementation using Pstream::maxCommsSize

by inspection in Pstreams/exchange.C

The number of exchange iterations is calculated with the byte count:

nIter = (maxNBytes-1)/Pstream::maxCommsSize+1;

but later on in the loop the send sizes per iteration are calculated in the element count, not the byte count:

nSend[proci] = min
(
    Pstream::maxCommsSize,
    sendBufs[proci].size()-startSend[proci]
);

// and
charSendBufs[proci] = reinterpret_cast<const char*>
(
    &(sendBufs[proci][startSend[proci]])
);

I think that requested Pstream::maxCommsSize needs to be translated into a maxNumElems, with the appropriate sizeof(T) granularity and that is what should be used.

@Mattijs for comments?

Assignee
Assign to
Time tracking