View Issue Details

IDProjectCategoryView StatusLast Update
0002250OpenFOAMBugpublic2016-09-21 14:20
Reporterprojectionist Assigned Tohenry  
PrioritynoneSeveritytextReproducibilityalways
Status closedResolutionno change required 
PlatformGNU/LinuxOSUbuntuOS Version15.04
Summary0002250: naming inconsistency of Pstream::scatter
DescriptionThis is more of a question rather than a bug report. Although, if the method Pstream::scatter() does the same job as MPI_Bcast(), then the naming of Pstream::scatter() could be considered a bit misleading.


The method Pstream::scatter() is described in the comment in Pstream.H as follows:
//- Scatter data. Distribute without modification.

The MPI method MPI_Scatter() is used to distribute chunks of an array to various processes, as discussed over there [http://stackoverflow.com/questions/27753153/differences-between-mpi-scatter-and-mpi-bcast]
Whereas, the MPI method MPI_Bcast() distributes its data to all processes.

If we follow the description of the method Pstream::scatter() and the MPI nomenclature then the method Pstream::scatter() would best be renamed into Pstream::broadcast().

I am not advocating a name-change of the method, I would rather have some clarification.
TagsNo tags attached.

Activities

henry

2016-09-20 09:14

manager   ~0006879

Pstream pre-dates the use of MPI in OpenFOAM, in fact Pstream was originally a wrapper around PVM and shmem (Cray shared-memory transport layer), and hence the naming convensions do not correspond exactly to those of MPI.

projectionist

2016-09-20 10:01

reporter   ~0006880

I suspected something like this. So, the name of Pstream::scatter() is completely independent of MPI's MPI_Scatter()?

I am correct, that Pstream::scatter() does the same job as MPI's MPI_Bcast()?

henry

2016-09-20 10:06

manager   ~0006881

Neither MPI_Scatter nor MPI_Bcast are used in OpenFOAM.

projectionist

2016-09-20 10:18

reporter   ~0006882

My question is whether Pstream::scatter() can be seen as analoguous to MPI_Bcast()?

From the definitions of MPI_Bcast() and MPI_Scatter() and what I observed in Pstream::scatter() I am under the impression that Pstream::scatter() acts the same way as MPI_Bcast().



Definitions from http://mpitutorial.com/tutorials/

MPI_Bcast: During a broadcast, one process sends the same data to all processes in a communicator.

MPI_Scatter: The primary difference between MPI_Bcast and MPI_Scatter is small but important. MPI_Bcast sends the same piece of data to all processes while MPI_Scatter sends chunks of an array to different processes.

henry

2016-09-21 14:20

manager   ~0006883

I have not used either MPI_Scatter or MPI_Bcast and not read the documentation on these or compared them with the Pstream functionality.

Issue History

Date Modified Username Field Change
2016-09-20 08:47 projectionist New Issue
2016-09-20 09:14 henry Note Added: 0006879
2016-09-20 10:01 projectionist Note Added: 0006880
2016-09-20 10:06 henry Note Added: 0006881
2016-09-20 10:18 projectionist Note Added: 0006882
2016-09-21 14:20 henry Assigned To => henry
2016-09-21 14:20 henry Status new => closed
2016-09-21 14:20 henry Resolution open => no change required
2016-09-21 14:20 henry Note Added: 0006883