Skip to content
Snippets Groups Projects
Commit b42d7210 authored by Oraji, Yussur Mustafa's avatar Oraji, Yussur Mustafa
Browse files

Generic for mpi_intercomm_create_from_groups

parent 18216a0f
No related branches found
No related tags found
1 merge request!25Draft: Fortran Support
......@@ -879,16 +879,14 @@ def get_intercomm(comm_create_func: str, tm: TemplateManager, before_idx: int =
call = MPICallFactory.mpi_comm_group("MPI_COMM_WORLD", "&" + world_group)
call.set_identifier(identifier)
tm.insert_instruction(call, before_instruction=before_inst)
inst = Instruction("int triplet[3];"
"triplet[0] =0;"
"triplet[1] =nprocs;"
"triplet[2] =2;", identifier=identifier)
tm.insert_instruction(inst, before_instruction=before_inst)
tm.add_stack_variable("int", "triplet", arr_dim=3)
tm.insert_instruction(ArrAsgn("triplet", 0, 0), before_instruction=before_inst)
tm.insert_instruction(ArrAsgn("triplet", 1, "nprocs"), before_instruction=before_inst)
tm.insert_instruction(ArrAsgn("triplet", 2, 2), before_instruction=before_inst)
call = MPICallFactory.mpi_group_incl(world_group, "1", "&triplet", "&" +even_group)
call.set_identifier(identifier)
tm.insert_instruction(call, before_instruction=before_inst)
inst = Instruction("triplet[0] =1;", identifier=identifier)
tm.insert_instruction(inst, before_instruction=before_inst)
tm.insert_instruction(ArrAsgn("triplet", 0, 1), before_instruction=before_inst)
call = MPICallFactory.mpi_group_incl(world_group, "1", "&triplet", "&" +odd_group)
call.set_identifier(identifier)
tm.insert_instruction(call, before_instruction=before_inst)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment