Skip to content

Commit

Permalink
python/fortran: remove -no-mpiio option
Browse files Browse the repository at this point in the history
Now MPI-IO functions are always available -- dummy functions if ROMIO is
disabled -- the fortran bindings no longer need the "-no-mpiio" option.
  • Loading branch information
hzhou committed Jan 23, 2025
1 parent b74ca55 commit 316d1e7
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 90 deletions.
2 changes: 1 addition & 1 deletion maint/gen_binding_f08.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import os

def main():
# currently support -no-real128, -no-mpiio, -fint-size, -aint-size, -count-size, -cint-size
# currently support -no-real128, -fint-size, -aint-size, -count-size, -cint-size
G.parse_cmdline()

binding_dir = G.get_srcdir_path("src/binding")
Expand Down
2 changes: 1 addition & 1 deletion maint/gen_binding_f77.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import os

def main():
# currently support -no-real128, -no-mpiio, -aint-is-int
# currently support -no-real128, -aint-is-int
G.parse_cmdline()

binding_dir = G.get_srcdir_path("src/binding")
Expand Down
23 changes: 0 additions & 23 deletions maint/local_python/binding_f08.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,8 +1184,6 @@ def dump_handle_routines():
G.out.append("END FUNCTION %s" % func_name)
# e.g. MPI_Comm_f2c
for a in G.handle_list:
if a == "MPI_File":
continue
if RE.match(r'MPIX?_(\w+)', a):
c_name = "c_" + RE.m.group(1)
for p in [("f", "c"), ("c", "f")]:
Expand All @@ -1201,25 +1199,6 @@ def dump_handle_routines():
G.out.append(" INTEGER :: res")
G.out.append("END FUNCTION %s" % func_name)

def dump_file_interface():
G.out.append("")
G.out.append("INTERFACE")
G.out.append("INDENT")
for p in [("f", "c"), ("c", "f")]:
func_name = "MPI_File_%s2%s" % (p[0], p[1])
G.out.append("")
G.out.append("FUNCTION %s(x) bind(C, name=\"%s\") result(res)" % (func_name, func_name))
G.out.append(" USE mpi_c_interface_types, ONLY: c_File")
if p[0] == "f":
G.out.append(" INTEGER, VALUE :: x")
G.out.append(" INTEGER(c_File) :: res")
else:
G.out.append(" INTEGER(c_File), VALUE :: x")
G.out.append(" INTEGER :: res")
G.out.append("END FUNCTION MPI_File_%s2%s" % (p[0], p[1]))
G.out.append("DEDENT")
G.out.append("END INTERFACE")

def filter_f08_sizeof_list():
if "no-real128" in G.opts:
G.f08_sizeof_list = [a for a in G.f08_sizeof_list if not a.endswith("128")]
Expand Down Expand Up @@ -1269,8 +1248,6 @@ def dump_sizeof_routines():
G.out.append("")
G.out.append("private :: c_int, c_Count, c_Status")
dump_handle_types()
if "no-mpiio" not in G.opts:
dump_file_interface()
dump_status_type()
dump_status_interface()
dump_handle_interface()
Expand Down
65 changes: 0 additions & 65 deletions maint/local_python/mpi_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,71 +245,6 @@ def parse_param_attributes(p):
else:
p['asynchronous'] = False

# FIXME: until ROMIO interface are generated
def get_mpiio_func_list():
io_func_name_list = [
"MPI_File_c2f",
"MPI_File_close",
"MPI_File_delete",
"MPI_File_errhandler_function",
"MPI_File_f2c",
"MPI_File_get_amode",
"MPI_File_get_atomicity",
"MPI_File_get_byte_offset",
"MPI_File_get_group",
"MPI_File_get_info",
"MPI_File_get_position",
"MPI_File_get_position_shared",
"MPI_File_get_size",
"MPI_File_get_type_extent",
"MPI_File_get_view",
"MPI_File_iread",
"MPI_File_iread_all",
"MPI_File_iread_at",
"MPI_File_iread_at_all",
"MPI_File_iread_shared",
"MPI_File_iwrite",
"MPI_File_iwrite_all",
"MPI_File_iwrite_at",
"MPI_File_iwrite_at_all",
"MPI_File_iwrite_shared",
"MPI_File_open",
"MPI_File_preallocate",
"MPI_File_read",
"MPI_File_read_all",
"MPI_File_read_all_begin",
"MPI_File_read_all_end",
"MPI_File_read_at",
"MPI_File_read_at_all",
"MPI_File_read_at_all_begin",
"MPI_File_read_at_all_end",
"MPI_File_read_ordered",
"MPI_File_read_ordered_begin",
"MPI_File_read_ordered_end",
"MPI_File_read_shared",
"MPI_File_seek",
"MPI_File_seek_shared",
"MPI_File_set_atomicity",
"MPI_File_set_info",
"MPI_File_set_size",
"MPI_File_set_view",
"MPI_File_sync",
"MPI_File_write",
"MPI_File_write_all",
"MPI_File_write_all_begin",
"MPI_File_write_all_end",
"MPI_File_write_at",
"MPI_File_write_at_all",
"MPI_File_write_at_all_begin",
"MPI_File_write_at_all_end",
"MPI_File_write_ordered",
"MPI_File_write_ordered_begin",
"MPI_File_write_ordered_end",
"MPI_File_write_shared",
"MPI_Register_datarep"
]
return [G.FUNCS[a.lower()] for a in io_func_name_list]

def get_f77_dummy_func_list():
dummy_func_name_list = [
"MPI_DUP_FN",
Expand Down

0 comments on commit 316d1e7

Please sign in to comment.