- if(instance->comm_world == MPI_COMM_NULL){
- MPI_Group group = new Group(instance->size);
- instance->comm_world = new Comm(group, nullptr);
+//get the index of the process in the process_data array
+MPI_Comm* smpi_deployment_comm_world(const char* instance_id)
+{
+ if (smpi_instances.empty()) { // no instance registered, we probably used smpirun.
+ return nullptr;
+ }
+ Instance& instance = smpi_instances.at(instance_id);
+ return &instance.comm_world;
+}
+
+msg_bar_t smpi_deployment_finalization_barrier(const char* instance_id)
+{
+ if (smpi_instances.empty()) { // no instance registered, we probably used smpirun.
+ return nullptr;