Skip to content
Snippets Groups Projects
Commit 7a68b75e authored by John Romein's avatar John Romein
Browse files

BugID: 225

CS1.parset determines whether InputSection and BGLProc, and BGLProc and Storage
should really connect.
parent 77b5357f
No related branches found
No related tags found
No related merge requests found
...@@ -32,15 +32,14 @@ ...@@ -32,15 +32,14 @@
#include <CS1_Interface/Stub_BGL_Subband.h> #include <CS1_Interface/Stub_BGL_Subband.h>
//#include <CS1_Interface/Stub_BGL_RFI_Mitigation.h> //#include <CS1_Interface/Stub_BGL_RFI_Mitigation.h>
#include <CS1_Interface/Stub_BGL_Visibilities.h> #include <CS1_Interface/Stub_BGL_Visibilities.h>
// tinyCEP #include <Transport/BGLConnection.h>
// Transporters
#if defined HAVE_MPI #if defined HAVE_MPI
#include <Transport/TH_MPI.h> #include <Transport/TH_MPI.h>
#endif #endif
#if defined USE_ZOID #if defined USE_ZOID
#include <CS1_Interface/TH_ZoidClient.h> #include <CS1_BGLProc/TH_ZoidClient.h>
#endif #endif
#include <Blob/KeyValueMap.h> #include <Blob/KeyValueMap.h>
...@@ -135,6 +134,8 @@ void AH_BGL_Processing::define(const KeyValueMap&) { ...@@ -135,6 +134,8 @@ void AH_BGL_Processing::define(const KeyValueMap&) {
unsigned psetsPerCell = itsParamSet.getInt32("BGLProc.PsetsPerCell"); unsigned psetsPerCell = itsParamSet.getInt32("BGLProc.PsetsPerCell");
unsigned usedNodesPerPset = itsParamSet.getInt32("BGLProc.NodesPerPset"); unsigned usedNodesPerPset = itsParamSet.getInt32("BGLProc.NodesPerPset");
unsigned nrSubbandsPerPset = itsParamSet.getInt32("General.SubbandsPerPset"); unsigned nrSubbandsPerPset = itsParamSet.getInt32("General.SubbandsPerPset");
bool connectInput = itsParamSet.getBool("Connections.InputToBGLProc");
bool connectOutput = itsParamSet.getBool("Connections.BGLProcToStorage");
ASSERTSTR(nrSubBands <= baseFreqs.size(), "Not enough base frequencies in Data.RefFreqs specified"); ASSERTSTR(nrSubBands <= baseFreqs.size(), "Not enough base frequencies in Data.RefFreqs specified");
...@@ -184,11 +185,26 @@ void AH_BGL_Processing::define(const KeyValueMap&) { ...@@ -184,11 +185,26 @@ void AH_BGL_Processing::define(const KeyValueMap&) {
#if defined USE_ZOID #if defined USE_ZOID
TH_ZoidClient *th = new TH_ZoidClient(); TH_ZoidClient *th = new TH_ZoidClient();
Connection *conn = new Connection("zoid", 0, dm.getGeneralInHolder(WH_BGL_Processing::SUBBAND_CHANNEL), th, true);
dm.setInConnection(WH_BGL_Processing::SUBBAND_CHANNEL, conn); if (connectInput) {
Connection *in = new BGLConnection("zoid", 0, dm.getGeneralInHolder(WH_BGL_Processing::SUBBAND_CHANNEL), th);
dm.setInConnection(WH_BGL_Processing::SUBBAND_CHANNEL, in);
}
if (connectOutput) {
#if 1
Connection *out = new BGLConnection("zoid", dm.getGeneralOutHolder(WH_BGL_Processing::VISIBILITIES_CHANNEL), 0, th);
dm.setOutConnection(WH_BGL_Processing::VISIBILITIES_CHANNEL, out);
#else
itsVisibilitiesStub->connect(cell, cellCore, dm, WH_BGL_Processing::VISIBILITIES_CHANNEL);
#endif
}
#else #else
if (connectInput)
itsSubbandStub->connect(cell, cellCore, dm, WH_BGL_Processing::SUBBAND_CHANNEL); itsSubbandStub->connect(cell, cellCore, dm, WH_BGL_Processing::SUBBAND_CHANNEL);
// itsRFI_MitigationStub->connect(cell, cellCore, dm, WH_BGL_Processing::RFI_MITIGATION_CHANNEL); // itsRFI_MitigationStub->connect(cell, cellCore, dm, WH_BGL_Processing::RFI_MITIGATION_CHANNEL);
if (connectOutput)
itsVisibilitiesStub->connect(cell, cellCore, dm, WH_BGL_Processing::VISIBILITIES_CHANNEL); itsVisibilitiesStub->connect(cell, cellCore, dm, WH_BGL_Processing::VISIBILITIES_CHANNEL);
#endif #endif
......
...@@ -1180,6 +1180,8 @@ WH_BGL_Processing::WH_BGL_Processing(const string& name, unsigned coreNumber, co ...@@ -1180,6 +1180,8 @@ WH_BGL_Processing::WH_BGL_Processing(const string& name, unsigned coreNumber, co
itsCurrentSubband = itsFirstSubband + coreNumber % nrNodesPerPset % nrSubbandsPerPset; itsCurrentSubband = itsFirstSubband + coreNumber % nrNodesPerPset % nrSubbandsPerPset;
itsSubbandIncrement = nrNodesPerPset % nrSubbandsPerPset; itsSubbandIncrement = nrNodesPerPset % nrSubbandsPerPset;
itsInputConnected = ps.getBool("Connections.InputToBGLProc");
getDataManager().addInDataHolder(SUBBAND_CHANNEL, new DH_Subband("input", ps)); getDataManager().addInDataHolder(SUBBAND_CHANNEL, new DH_Subband("input", ps));
//getDataManager().addInDataHolder(RFI_MITIGATION_CHANNEL, new DH_RFI_Mitigation("RFI")); //getDataManager().addInDataHolder(RFI_MITIGATION_CHANNEL, new DH_RFI_Mitigation("RFI"));
getDataManager().addOutDataHolder(VISIBILITIES_CHANNEL, new DH_Visibilities("output", ps)); getDataManager().addOutDataHolder(VISIBILITIES_CHANNEL, new DH_Visibilities("output", ps));
...@@ -1787,6 +1789,7 @@ void WH_BGL_Processing::process() ...@@ -1787,6 +1789,7 @@ void WH_BGL_Processing::process()
readTimer.start(); readTimer.start();
getDataManager().readyWithInHolder(SUBBAND_CHANNEL); getDataManager().readyWithInHolder(SUBBAND_CHANNEL);
#if defined SPARSE_FLAGS #if defined SPARSE_FLAGS
if (itsInputConnected)
get_DH_Subband()->getExtraData(); get_DH_Subband()->getExtraData();
#endif #endif
readTimer.stop(); readTimer.stop();
......
...@@ -139,6 +139,7 @@ class WH_BGL_Processing: public WorkHolder { ...@@ -139,6 +139,7 @@ class WH_BGL_Processing: public WorkHolder {
const ACC::APS::ParameterSet &itsPS; const ACC::APS::ParameterSet &itsPS;
const unsigned itsCoreNumber; const unsigned itsCoreNumber;
unsigned itsFirstSubband, itsCurrentSubband, itsLastSubband, itsSubbandIncrement; unsigned itsFirstSubband, itsCurrentSubband, itsLastSubband, itsSubbandIncrement;
bool itsInputConnected;
static FIR itsFIRs[NR_STATIONS][NR_POLARIZATIONS][NR_SUBBAND_CHANNELS] CACHE_ALIGNED; static FIR itsFIRs[NR_STATIONS][NR_POLARIZATIONS][NR_SUBBAND_CHANNELS] CACHE_ALIGNED;
......
...@@ -19,6 +19,9 @@ Connections.Input_BGLProc.Ports =[8000,8001,8002,8003,8004,8005,8006,8007,8008, ...@@ -19,6 +19,9 @@ Connections.Input_BGLProc.Ports =[8000,8001,8002,8003,8004,8005,8006,8007,8008,
Connections.BGLProc_Storage.Ports=[8200,8201,8202,8203,8204,8205,8206,8207,8208,8209,8210,8211,8212,8213,8214,8215] Connections.BGLProc_Storage.Ports=[8200,8201,8202,8203,8204,8205,8206,8207,8208,8209,8210,8211,8212,8213,8214,8215]
Connections.AMC.Port =31337 Connections.AMC.Port =31337
Connections.InputToBGLProc = T
Connections.BGLProcToStorage = T
# The format of the data # The format of the data
Observation.NSubbands=4 Observation.NSubbands=4
Observation.NChannels = 256 Observation.NChannels = 256
......
...@@ -20,6 +20,9 @@ Connections.Input_BGLProc.Ports =[8000, 8001, 8002, 8003, 8004, 8005, 8006, 800 ...@@ -20,6 +20,9 @@ Connections.Input_BGLProc.Ports =[8000, 8001, 8002, 8003, 8004, 8005, 8006, 800
Connections.BGLProc_Storage.Ports=[8200, 8201, 8202, 8203, 8204, 8205, 8206, 8207, 8208, 8209, 8210, 8211, 8212, 8213, 8214, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8223, 8224, 8225, 8226, 8227, 8228, 8229, 8230, 8231, 8232, 8233, 8234, 8235, 8236, 8237, 8238, 8239, 8240, 8241, 8242, 8243, 8244, 8245, 8246, 8247, 8248, 8249, 8250, 8251, 8252, 8253, 8254, 8255, 8256, 8257, 8258, 8259, 8260, 8261, 8262, 8263] Connections.BGLProc_Storage.Ports=[8200, 8201, 8202, 8203, 8204, 8205, 8206, 8207, 8208, 8209, 8210, 8211, 8212, 8213, 8214, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8223, 8224, 8225, 8226, 8227, 8228, 8229, 8230, 8231, 8232, 8233, 8234, 8235, 8236, 8237, 8238, 8239, 8240, 8241, 8242, 8243, 8244, 8245, 8246, 8247, 8248, 8249, 8250, 8251, 8252, 8253, 8254, 8255, 8256, 8257, 8258, 8259, 8260, 8261, 8262, 8263]
Connections.AMC.Port =31337 Connections.AMC.Port =31337
Connections.InputToBGLProc = T
Connections.BGLProcToStorage = T
# The format of the data # The format of the data
Observation.NChannels = 256 Observation.NChannels = 256
Observation.NPolarisations=2 Observation.NPolarisations=2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment