Skip to content

Commit

Permalink
Add detail::MPIEnsemble members for the group rank and size. Plus doc…
Browse files Browse the repository at this point in the history
…string changes
  • Loading branch information
ptheywood committed Nov 21, 2023
1 parent 91d11f7 commit 29e97bd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 18 additions & 1 deletion include/flamegpu/simulation/detail/MPIEnsemble.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,25 @@ class MPIEnsemble {
};

public:
/**
* The rank within the world MPI communicator
*/
const int world_rank;
/**
* The size of the world MPI communicator
*/
const int world_size;
/**
* The rank within the MPI shared memory communicator (i.e. the within the node)
*/
const int group_rank;
/**
* The size of the MPI shared memory communicator (i.e. the within the node)
*/
const int group_size;
/**
* The total number of runs to be executed (only used for printing error warnings)
*/
const unsigned int total_runs;
/**
* Construct the object for managing MPI comms during an ensemble
Expand Down Expand Up @@ -94,7 +111,7 @@ class MPIEnsemble {
*/
static int queryMPISharedGroupRank();
/**
* @return retrieve the number of mpi processes on the current shared memory region
* @return retrieve the number of mpi processes on the current shared memory region
*/
static int queryMPISharedGroupSize();
/**
Expand Down
2 changes: 2 additions & 0 deletions src/flamegpu/simulation/detail/MPIEnsemble.cu
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ MPIEnsemble::MPIEnsemble(const CUDAEnsemble::EnsembleConfig &_config, const unsi
: config(_config)
, world_rank(queryMPIWorldRank())
, world_size(queryMPIWorldSize())
, group_rank(queryMPISharedGroupRank())
, group_size(queryMPISharedGroupSize())
, total_runs(_total_runs)
, MPI_ERROR_DETAIL(AbstractSimRunner::createErrorDetailMPIDatatype()) { }

Expand Down

0 comments on commit 29e97bd

Please sign in to comment.