Skip to content

Commit bf9e642

Browse files
authored
Merge pull request #7 from Algebraic-Programming/feat/updateTaskR
feat: update TaskR
2 parents 4962054 + ab01dd6 commit bf9e642

File tree

6 files changed

+34
-31
lines changed

6 files changed

+34
-31
lines changed

.github/workflows/master-test-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
uses: actions/checkout@v4
4040

4141
- name: Setup
42-
run: source /home/hicr/.bashrc && meson setup build -Dengines=mpi,cloudr -Db_coverage=true -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=true
42+
run: source /home/hicr/.bashrc && meson setup build -Dengines=mpi,cloudr -Db_coverage=true -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=false
4343

4444
- name: Compile
4545
run: source /home/hicr/.bashrc && meson compile -C build

.github/workflows/pr-development-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
uses: actions/checkout@v4
4040

4141
- name: Setup
42-
run: source /home/hicr/.bashrc && meson setup build -Db_coverage=true -Dengines=mpi,cloudr -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=true
42+
run: source /home/hicr/.bashrc && meson setup build -Db_coverage=true -Dengines=mpi,cloudr -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=false
4343

4444
- name: Compile
4545
run: source /home/hicr/.bashrc && meson compile -C build

include/hllm/channelCreationImpl.hpp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,14 @@ __INLINE__ void createChannelBuffers(HiCR::MemoryManager
188188
}
189189

190190
void createChannels(HiCR::MemoryManager &memoryManager,
191-
HiCR::CommunicationManager &communicationManager,
192-
std::shared_ptr<HiCR::MemorySpace> &memorySpace,
193-
std::map<HiCR::GlobalMemorySlot::tag_t, nlohmann::json> &consumersData,
194-
std::map<HiCR::GlobalMemorySlot::tag_t, nlohmann::json> &producersData,
195-
HiCR::GlobalMemorySlot::tag_t channelsIds,
196-
std::map<HiCR::GlobalMemorySlot::tag_t, std::string> &channelTagNameMap,
197-
std::unordered_map<std::string, std::unique_ptr<hLLM::channel::channelConsumerInterface_t>> &consumers,
198-
std::unordered_map<std::string, std::unique_ptr<hLLM::channel::channelProducerInterface_t>> &producers)
191+
HiCR::CommunicationManager &communicationManager,
192+
std::shared_ptr<HiCR::MemorySpace> &memorySpace,
193+
std::map<HiCR::GlobalMemorySlot::tag_t, nlohmann::json> &consumersData,
194+
std::map<HiCR::GlobalMemorySlot::tag_t, nlohmann::json> &producersData,
195+
HiCR::GlobalMemorySlot::tag_t channelsIds,
196+
std::map<HiCR::GlobalMemorySlot::tag_t, std::string> &channelTagNameMap,
197+
std::unordered_map<std::string, std::unique_ptr<hLLM::channel::channelConsumerInterface_t>> &consumers,
198+
std::unordered_map<std::string, std::unique_ptr<hLLM::channel::channelProducerInterface_t>> &producers)
199199
{
200200
std::map<HiCR::GlobalMemorySlot::tag_t, std::vector<HiCR::CommunicationManager::globalKeyMemorySlotPair_t>> memorySlotsToExchange;
201201
std::map<HiCR::GlobalMemorySlot::tag_t, std::shared_ptr<HiCR::LocalMemorySlot>> coordinationBufferSizesSlots;
@@ -319,22 +319,22 @@ void Engine::createDependencies()
319319
}
320320

321321
createChannels(*_unbufferedMemoryManager,
322-
*_unbufferedCommunicationManager,
323-
_unbufferedMemorySpace,
324-
unbufferedConsumers,
325-
unbufferedProducers,
326-
unbufferedChannelId,
327-
unbufferedChannelTagNameMap,
328-
_consumers,
329-
_producers);
322+
*_unbufferedCommunicationManager,
323+
_unbufferedMemorySpace,
324+
unbufferedConsumers,
325+
unbufferedProducers,
326+
unbufferedChannelId,
327+
unbufferedChannelTagNameMap,
328+
_consumers,
329+
_producers);
330330
createChannels(*_bufferedMemoryManager,
331-
*_bufferedCommunicationManager,
332-
_bufferedMemorySpace,
333-
bufferedConsumers,
334-
bufferedProducers,
335-
bufferedChannelId,
336-
bufferedChannelTagNameMap,
337-
_consumers,
338-
_producers);
331+
*_bufferedCommunicationManager,
332+
_bufferedMemorySpace,
333+
bufferedConsumers,
334+
bufferedProducers,
335+
bufferedChannelId,
336+
bufferedChannelTagNameMap,
337+
_consumers,
338+
_producers);
339339
}
340340
} // namespace hLLM

include/hllm/engine.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,10 +498,11 @@ class Engine final
498498
_taskr->setTaskCallbackHandler(HiCR::tasking::Task::callback_t::onTaskSuspend, [&](taskr::Task *task) { _taskr->resumeTask(task); });
499499

500500
// Setting service to listen for incoming administrative messages
501-
std::function<void()> RPCListeningService = [this]() {
501+
std::function<void()> RPCListeningServiceFc = [this]() {
502502
if (_rpcEngine->hasPendingRPCs()) _rpcEngine->listen();
503503
};
504-
_taskr->addService(&RPCListeningService);
504+
_rpcListeningService = std::make_unique<taskr::Service>(RPCListeningServiceFc, 50);
505+
_taskr->addService(_rpcListeningService.get());
505506

506507
// Running TaskR
507508
_taskr->run();
@@ -626,6 +627,8 @@ class Engine final
626627
HiCR::Instance::instanceId_t _deployerInstanceId;
627628

628629
std::map<partitionId_t, deployr::Runner::runnerId_t> _partitionRunnerIdMap;
630+
631+
std::unique_ptr<taskr::Service> _rpcListeningService;
629632
}; // class Engine
630633

631634
} // namespace hLLM

include/hllm/parseConfigImpl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ __INLINE__ std::unordered_map<std::string, nlohmann::json> Engine::parseDependen
5151
{
5252
if (dependenciesMap.contains(output) == false)
5353
{
54-
HICR_THROW_RUNTIME("Producer %s defined in partition %s has no consumers defined", output.get<std::string>(), partition["Name"]);
54+
HICR_THROW_RUNTIME("Producer %s defined in partition %s has no consumers defined", output.get<std::string>().c_str(), partition["Name"].get<std::string>().c_str());
5555
}
5656

5757
if (dependenciesMap[output].contains("Producer"))
5858
{
5959
HICR_THROW_RUNTIME("Set two producers for buffered dependency %s is not allowed. Producer: %s, tried to add %s",
60-
output,
60+
output.get<std::string>().c_str(),
6161
hicr::json::getNumber<partitionId_t>(dependenciesMap[output], "Producer"),
6262
hicr::json::getString(partition, "Name").c_str());
6363
}

0 commit comments

Comments
 (0)