Skip to content
Snippets Groups Projects
Commit c6e30d28 authored by Jan David Mol's avatar Jan David Mol
Browse files

COB-64: Measure real-timeness of MPI transpose

parent 7bb720df
No related branches found
No related tags found
1 merge request!6Import cobalt2 into lofar4
......@@ -743,7 +743,7 @@ namespace LOFAR {
Queue< SmartPtr< MPIData<SampleT> > > mpiQueue(str(format(
"sendInputToPipeline::mpiQueue [station %s]") % stationID.name()));
MPISender sender(logPrefix, stationIdx, subbandDistribution);
MPISender sender(logPrefix, stationIdx, subbandDistribution, ps.settings.blockDuration());
/*
* Stream the data.
......
......@@ -46,6 +46,7 @@
#include <Common/LofarLogger.h>
#include <Common/Timer.h>
#include <CoInterface/OMPThread.h>
#include <CoInterface/BudgetTimer.h>
#include <InputProc/SampleType.h>
using namespace LOFAR;
......@@ -197,14 +198,15 @@ namespace LOFAR {
template struct MPIData< SampleType<i4complex> >;
MPISender::MPISender( const std::string &logPrefix, size_t stationIdx,
const SubbandDistribution &subbandDistribution )
const SubbandDistribution &subbandDistribution, float blockDuration )
:
logPrefix(logPrefix),
stationIdx(stationIdx),
subbandDistribution(subbandDistribution),
targetRanks(keys(subbandDistribution)),
subbandOffsets(targetRanks.size(), 0),
nrSubbands(values(subbandDistribution).size())
nrSubbands(values(subbandDistribution).size()),
blockDuration(blockDuration)
{
// Determine the offset of the set of subbands for each rank within
// the members in MPIData<SampleT>.
......@@ -251,6 +253,10 @@ namespace LOFAR {
SmartPtr< MPIData<SampleT> > mpiData;
NSTimer mpiSendTimer(str(format("%s MPI send data") % logPrefix), true, true);
BudgetTimer copyTimer(
str(format("%s MPI send data") % logPrefix),
blockDuration,
true, true);
size_t nrProcessedSamples = 0;
size_t nrFlaggedSamples = 0;
......
......@@ -129,7 +129,8 @@ namespace LOFAR {
class MPISender {
public:
MPISender( const std::string &logPrefix, size_t stationIdx,
const SubbandDistribution &subbandDistribution );
const SubbandDistribution &subbandDistribution,
float blockDuration );
/*
* Sends blocks over MPI until a NULL is read from the inputQueue.
......@@ -153,6 +154,7 @@ namespace LOFAR {
const std::vector<int> targetRanks;
std::vector<size_t> subbandOffsets;
const size_t nrSubbands;
const float blockDuration;
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment