From 3afe3c598c1ce4597f857f56562bd5cb02c32585 Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Tue, 11 Aug 2020 10:58:37 +0200 Subject: [PATCH] Add stubs --- jf-live-daq/src/main.cpp | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/jf-live-daq/src/main.cpp b/jf-live-daq/src/main.cpp index 7f6fc3e..6069a0b 100644 --- a/jf-live-daq/src/main.cpp +++ b/jf-live-daq/src/main.cpp @@ -1,7 +1,23 @@ #include #include -int main(int argc, char** argv) { +void receive() +{ + +} + +void assemble() +{ + +} + +void write() +{ + +} + +int main(int argc, char** argv) +{ // Initialize the MPI environment MPI_Init(NULL, NULL); @@ -18,9 +34,15 @@ int main(int argc, char** argv) { int name_len; MPI_Get_processor_name(processor_name, &name_len); - // Print off a hello world message - printf("Hello world from processor %s, rank %d out of %d processors\n", - processor_name, world_rank, world_size); + const int n_modules = 16; + + if (world_rank == 0) { + assemble(); + } else if (world_rank <= n_modules) { + receive(); + } else { + write(); + } // Finalize the MPI environment. MPI_Finalize();