mpi: doxygen fixes

This commit is contained in:
Tommaso Pecorella
2022-01-09 23:18:47 -06:00
parent 48e6ac5405
commit 2182bb0ece
4 changed files with 43 additions and 13 deletions

View File

@@ -47,6 +47,8 @@ class Packet;
/**
* \ingroup mpi
*
* Write to std::cout only from rank 0.
* Number line for sorting output of parallel runs.
*
@@ -64,6 +66,14 @@ class Packet;
} \
while (false)
/**
* \ingroup mpi
*
* Append to std::cout only from rank 0.
* Number line for sorting output of parallel runs.
*
* \param x The output operators.
*/
#define RANK0COUTAPPEND(x) \
do \
if (SinkTracer::GetWorldRank () == 0) \
@@ -72,13 +82,17 @@ class Packet;
} \
while (false)
/**
* \ingroup mpi
*
* Collects data about incoming packets.
*/
class SinkTracer
{
public:
/**
* PacketSink receive trace callback.
* \copydetails ns3::Packet::TwoAddressTracedCallback
* PacketSink Init.
*/
static void Init (void);
@@ -93,6 +107,8 @@ public:
/**
* Verify the sink trace count observed matches the expected count.
* Prints message to std::cout indicating success or fail.
*
* \param expectedCount Expected number of packet received.
*/
static void Verify (unsigned long expectedCount);
@@ -125,8 +141,8 @@ public:
}
/**
* Get current line count and increment.
*
* Get current line count and increment it.
* \return the line count.
*/
static int GetLineCount (void)
{
@@ -134,10 +150,10 @@ public:
}
private:
static unsigned long m_sinkCount; /*< Running sum of number of SinkTrace calls observed */
static unsigned long m_line; /*< Current output line number for ordering output */
static int m_worldRank; /*< MPI CommWorld rank */
static int m_worldSize; /*< MPI CommWorld size */
static unsigned long m_sinkCount; //!< Running sum of number of SinkTrace calls observed
static unsigned long m_line; //!< Current output line number for ordering output
static int m_worldRank; //!< MPI CommWorld rank
static int m_worldSize; //!< MPI CommWorld size
};
} // namespace ns3

View File

@@ -77,16 +77,20 @@ using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("SimpleDistributedMpiComm");
// Tag for whether this rank should go into a new communicator
// ns-3 ranks will have color == 1.
/**
* Tag for whether this rank should go into a new communicator
* ns-3 ranks will have color == 1.
* @{
*/
const int NS_COLOR = 1;
const int NOT_NS_COLOR = NS_COLOR + 1;
/** @} */
/**
* Report my rank, in both MPI_COMM_WORLD and the split communicator.
*
* \param [in] color My role, either ns-3 rank or other rank.
* \param [in] spitComm The split communicator.
* \param [in] splitComm The split communicator.
*/
void
ReportRank (int color, MPI_Comm splitComm)

View File

@@ -35,7 +35,12 @@
namespace ns3 {
/**
* \defgroup mpi MPI Distributed Simulation
*
*/
/**
* \ingroup mpi
* \ingroup tests
* \defgroup mpi-tests MPI Distributed Simulation tests
*/
class ParallelCommunicationInterface;

View File

@@ -25,6 +25,8 @@
using namespace ns3;
/**
* \ingroup mpi-tests
*
* This version of ns3::ExampleTestCase is specialized for MPI
* by accepting the number of ranks as a parameter,
* then building a `--command-template` string which
@@ -94,7 +96,10 @@ MpiTestCase::GetPostProcessingCommand (void) const
return command;
}
/** MPI specialization of ns3::ExampleTestSuite. */
/**
* \ingroup mpi-tests
* MPI specialization of ns3::ExampleTestSuite.
*/
class MpiTestSuite : public TestSuite
{
public: