Skip to content
Snippets Groups Projects
Commit 65d9aca9 authored by Martin Gels's avatar Martin Gels
Browse files

Bug 1005: Renamed BGL in CN.

parent ec64c0c3
No related branches found
No related tags found
No related merge requests found
......@@ -21,9 +21,9 @@
#include <lofar_config.h>
#include <PLC/ACCmain.h>
#include <Interface/BGL_Command.h>
#include <Interface/BGL_Configuration.h>
#include <Interface/BGL_Mapping.h>
#include <Interface/CN_Command.h>
#include <Interface/CN_Configuration.h>
#include <Interface/CN_Mapping.h>
#include <Interface/Parset.h>
#include <InputSection.h>
#include <OutputSection.h>
......@@ -137,22 +137,22 @@ static void deleteClientStreams()
static void configureCNs(const Parset &parset)
{
BGL_Command command(BGL_Command::PREPROCESS);
BGL_Configuration configuration;
CN_Command command(CN_Command::PREPROCESS);
CN_Configuration configuration;
configuration.nrStations() = parset.nrStations();
configuration.nrBitsPerSample() = parset.nrBitsPerSample();
configuration.nrChannelsPerSubband() = parset.nrChannelsPerSubband();
configuration.nrSamplesPerIntegration() = parset.BGLintegrationSteps();
configuration.nrSamplesToBGLProc() = parset.nrSamplesToBGLProc();
configuration.nrSamplesPerIntegration() = parset.CNintegrationSteps();
configuration.nrSamplesToCNProc() = parset.nrSamplesToCNProc();
configuration.nrUsedCoresPerPset() = parset.nrCoresPerPset();
configuration.nrSubbandsPerPset() = parset.nrSubbandsPerPset();
configuration.delayCompensation() = parset.delayCompensation();
configuration.correctBandPass() = parset.correctBandPass();
configuration.sampleRate() = parset.sampleRate();
configuration.inputPsets() = parset.getUint32Vector("OLAP.BGLProc.inputPsets");
configuration.outputPsets() = parset.getUint32Vector("OLAP.BGLProc.outputPsets");
configuration.tabList() = parset.getUint32Vector("OLAP.BGLProc.tabList");
configuration.inputPsets() = parset.getUint32Vector("OLAP.CNProc.inputPsets");
configuration.outputPsets() = parset.getUint32Vector("OLAP.CNProc.outputPsets");
configuration.tabList() = parset.getUint32Vector("OLAP.CNProc.tabList");
configuration.refFreqs() = parset.subbandToFrequencyMapping();
std::clog << "configuring " << nrCoresPerPset << " cores ...";
......@@ -174,7 +174,7 @@ static void unconfigureCNs()
std::clog << "unconfiguring " << nrCoresPerPset << " cores ...";
std::clog.flush();
BGL_Command command(BGL_Command::POSTPROCESS);
CN_Command command(CN_Command::POSTPROCESS);
for (unsigned core = 0; core < nrCoresPerPset; core ++) {
std::clog << ' ' << core;
......@@ -191,7 +191,7 @@ static void stopCNs()
std::clog << "stopping " << nrCoresPerPset << " cores ... ";
std::clog.flush();
BGL_Command command(BGL_Command::STOP);
CN_Command command(CN_Command::STOP);
for (unsigned core = 0; core < nrCoresPerPset; core ++)
command.write(clientStreams[core]);
......@@ -382,7 +382,7 @@ void *master_thread(void *)
parset.adoptFile("OLAP.parset");
checkParset(parset);
nrRuns = static_cast<unsigned>(ceil((parset.stopTime() - parset.startTime()) / parset.BGLintegrationTime()));
nrRuns = static_cast<unsigned>(ceil((parset.stopTime() - parset.startTime()) / parset.CNintegrationTime()));
std::clog << "nrRuns = " << nrRuns << std::endl;
bool hasInputSection = parset.inputPsetIndex(myPsetNumber) >= 0;
......@@ -390,7 +390,7 @@ void *master_thread(void *)
#if !defined HAVE_ZOID
nrCoresPerPset = parset.nrCoresPerPset();
string streamType = parset.getTransportType("OLAP.OLAP_Conn.IONProc_BGLProc");
string streamType = parset.getTransportType("OLAP.OLAP_Conn.IONProc_CNProc");
createClientStreams(nrCoresPerPset, streamType);
#endif
......@@ -409,11 +409,11 @@ void *master_thread(void *)
if (!hasInputSection && hasOutputSection) {
// quick hack to send PROCESS commands to CNs
BGL_Command command(BGL_Command::PROCESS);
CN_Command command(CN_Command::PROCESS);
unsigned core = 0;
for (int count = nrRuns * parset.nrSubbandsPerPset(); -- count >= 0;) {
command.write(clientStreams[BGL_Mapping::mapCoreOnPset(core, myPsetNumber)]);
command.write(clientStreams[CN_Mapping::mapCoreOnPset(core, myPsetNumber)]);
if (++ core == nrCoresPerPset)
core = 0;
......
......@@ -33,8 +33,8 @@
#include <ION_Allocator.h>
//#include <TH_ZoidServer.h>
#include <Interface/AlignedStdAllocator.h>
#include <Interface/BGL_Command.h>
#include <Interface/BGL_Mapping.h>
#include <Interface/CN_Command.h>
#include <Interface/CN_Mapping.h>
#include <Interface/SubbandMetaData.h>
#include <pthread.h>
......@@ -408,10 +408,10 @@ template<typename SAMPLE_TYPE> void InputSection<SAMPLE_TYPE>::process()
#else
BGL_Command command(BGL_Command::PROCESS);
CN_Command command(CN_Command::PROCESS);
for (unsigned subbandBase = 0; subbandBase < itsNSubbandsPerPset; subbandBase ++) {
unsigned core = BGL_Mapping::mapCoreOnPset(itsCurrentComputeCore, itsPsetNumber);
unsigned core = CN_Mapping::mapCoreOnPset(itsCurrentComputeCore, itsPsetNumber);
Stream *stream = itsClientStreams[core];
// tell CN to process data
......
pkginclude_HEADERS = Package__Version.h \
BeamletBuffer.h \
BGL_Personality.h \
CN_Personality.h \
InputSection.h \
InputThread.h \
InputThreadAsm.h \
......@@ -17,7 +17,7 @@ FCNP_ServerStream.h
liblofar_impl_la_SOURCES = $(pkginclude_HEADERS) \
BeamletBuffer.cc \
BGL_Personality.cc \
CN_Personality.cc \
ION_main.cc \
InputSection.cc \
InputThread.cc \
......
......@@ -21,7 +21,7 @@
//# Always #include <lofar_config.h> first!
#include <lofar_config.h>
#include <Interface/BGL_Mapping.h>
#include <Interface/CN_Mapping.h>
#include <Interface/Allocator.h>
#include <OutputSection.h>
......@@ -93,7 +93,7 @@ void OutputSection::connectToStorage(const Parset *ps)
unsigned storageHostIndex = myPsetIndex / nrPsetsPerStorage;
unsigned storagePortIndex = myPsetIndex % nrPsetsPerStorage;
string prefix = "OLAP.OLAP_Conn.BGLProc_Storage";
string prefix = "OLAP.OLAP_Conn.IONProc_Storage";
string connectionType = ps->getString(prefix + "_Transport");
if (connectionType == "NULL") {
......@@ -154,7 +154,7 @@ void OutputSection::process()
CorrelatedData *data = lastTime ? itsFreeQueue.remove() : firstTime ? itsVisibilitySums[subband] : itsTmpSum;
unsigned channel = BGL_Mapping::mapCoreOnPset(itsCurrentComputeCore, itsPsetNumber);
unsigned channel = CN_Mapping::mapCoreOnPset(itsCurrentComputeCore, itsPsetNumber);
data->read(itsStreamsFromCNs[channel]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment