Skip to content
Snippets Groups Projects

Draft: Fortran Support

1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
@@ -223,7 +223,7 @@ def get_type_buffers(tm, type_1, type_2, size_1, size_2):
@@ -223,7 +223,7 @@ def get_type_buffers(tm, type_1, type_2, size_1, size_2):
else:
else:
assert type_1 in user_defined_types
assert type_1 in user_defined_types
buf_name_1, type_1_variable = get_buffer_for_usertype(type_1, tm, "MPICALL", size_1)
buf_name_1, type_1_variable = get_buffer_for_usertype(type_1, tm, "MPICALL", size_1)
tm.register_instruction(str(get_free_by_name(buf_name_1)))
tm.register_instruction(get_free_by_name(buf_name_1))
if type_2 in predefined_types:
if type_2 in predefined_types:
type_2_variable = type_2
type_2_variable = type_2
buf_alloc_call = get_buffer_for_type(type_2, size_2)
buf_alloc_call = get_buffer_for_type(type_2, size_2)
@@ -233,7 +233,7 @@ def get_type_buffers(tm, type_1, type_2, size_1, size_2):
@@ -233,7 +233,7 @@ def get_type_buffers(tm, type_1, type_2, size_1, size_2):
else:
else:
assert type_2 in user_defined_types
assert type_2 in user_defined_types
buf_name_2, type_2_variable = get_buffer_for_usertype(type_2, tm, "MPICALL", size_2)
buf_name_2, type_2_variable = get_buffer_for_usertype(type_2, tm, "MPICALL", size_2)
tm.register_instruction(str(get_free_by_name(buf_name_2)))
tm.register_instruction(get_free_by_name(buf_name_2))
return type_1_variable, buf_name_1, type_2_variable, buf_name_2
return type_1_variable, buf_name_1, type_2_variable, buf_name_2
@@ -380,13 +380,13 @@ def get_send_recv_template(send_func: str = "mpi_isend", recv_func: str | typing
@@ -380,13 +380,13 @@ def get_send_recv_template(send_func: str = "mpi_isend", recv_func: str | typing
if send_func in ["mpi_bsend", "mpi_ibsend", "mpi_bsend_init"]:
if send_func in ["mpi_bsend", "mpi_ibsend", "mpi_bsend_init"]:
tm.add_stack_variable("int", "freed_size")
tm.add_stack_variable("int", "freed_size")
tm.register_instruction(MPICallFactory.mpi_buffer_detach("mpi_buf", "&freed_size"), identifier="FREE")
tm.register_instruction(MPICallFactory.mpi_buffer_detach("mpi_buf", "&freed_size"), identifier="FREE")
tm.register_instruction(str(get_free_by_name("mpi_buf")), identifier="FREE")
tm.register_instruction(get_free_by_name("mpi_buf"), identifier="FREE")
tm.register_instruction(cf.get_buffer_free(), identifier="FREE")
tm.register_instruction(cf.get_buffer_free(), identifier="FREE")
if send_func in sendrecv_funcs:
if send_func in sendrecv_funcs:
# spilt send and recv buf
# spilt send and recv buf
tm.register_instruction(str(get_free_by_name("recv_buf")), identifier="FREE")
tm.register_instruction(get_free_by_name("recv_buf"), identifier="FREE")
if send_func in persistent_send_funcs:
if send_func in persistent_send_funcs:
tm.register_instruction(CorrectMPICallFactory.mpi_request_free(), rank_to_execute=1,identifier="FREE")
tm.register_instruction(CorrectMPICallFactory.mpi_request_free(), rank_to_execute=1,identifier="FREE")
Loading