Skip to content
Snippets Groups Projects

Draft: Fortran Support

1 file
+ 5
7
Compare changes
  • Side-by-side
  • Inline
@@ -879,16 +879,14 @@ def get_intercomm(comm_create_func: str, tm: TemplateManager, before_idx: int =
@@ -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 = MPICallFactory.mpi_comm_group("MPI_COMM_WORLD", "&" + world_group)
call.set_identifier(identifier)
call.set_identifier(identifier)
tm.insert_instruction(call, before_instruction=before_inst)
tm.insert_instruction(call, before_instruction=before_inst)
inst = Instruction("int triplet[3];"
tm.add_stack_variable("int", "triplet", arr_dim=3)
"triplet[0] =0;"
tm.insert_instruction(ArrAsgn("triplet", 0, 0), before_instruction=before_inst)
"triplet[1] =nprocs;"
tm.insert_instruction(ArrAsgn("triplet", 1, "nprocs"), before_instruction=before_inst)
"triplet[2] =2;", identifier=identifier)
tm.insert_instruction(ArrAsgn("triplet", 2, 2), before_instruction=before_inst)
tm.insert_instruction(inst, before_instruction=before_inst)
call = MPICallFactory.mpi_group_incl(world_group, "1", "&triplet", "&" +even_group)
call = MPICallFactory.mpi_group_incl(world_group, "1", "&triplet", "&" +even_group)
call.set_identifier(identifier)
call.set_identifier(identifier)
tm.insert_instruction(call, before_instruction=before_inst)
tm.insert_instruction(call, before_instruction=before_inst)
inst = Instruction("triplet[0] =1;", identifier=identifier)
tm.insert_instruction(ArrAsgn("triplet", 0, 1), before_instruction=before_inst)
tm.insert_instruction(inst, before_instruction=before_inst)
call = MPICallFactory.mpi_group_incl(world_group, "1", "&triplet", "&" +odd_group)
call = MPICallFactory.mpi_group_incl(world_group, "1", "&triplet", "&" +odd_group)
call.set_identifier(identifier)
call.set_identifier(identifier)
tm.insert_instruction(call, before_instruction=before_inst)
tm.insert_instruction(call, before_instruction=before_inst)
Loading