Skip to content

Commit 2aa76cf

Browse files
committed
add Fortran constant support
handle constants were generated in decimal format using https://github.com/mpiwg-abi/specification-text-draft/blob/main/print-handle-constants.py#L539 predefined procedures are missing. API definitions are missing. Signed-off-by: Jeff Hammond <jeff.science@gmail.com>
1 parent 4139001 commit 2aa76cf

5 files changed

+608
-0
lines changed

mpi_fortran_callback_prototypes.F90

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
module mpi_fortran_callback_prototypes
2+
3+
ABSTRACT INTERFACE
4+
SUBROUTINE MPI_User_function(invec, inoutvec, len, datatype)
5+
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
6+
use mpi_fortran_integer_types
7+
use mpi_fortran_handle_types
8+
TYPE(C_PTR), VALUE :: invec, inoutvec
9+
INTEGER :: len
10+
TYPE(MPI_Datatype) :: datatype
11+
END SUBROUTINE MPI_User_function
12+
END INTERFACE
13+
14+
ABSTRACT INTERFACE
15+
SUBROUTINE MPI_User_function_c(invec, inoutvec, len, datatype) !(_c)
16+
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
17+
use mpi_fortran_integer_types
18+
use mpi_fortran_handle_types
19+
TYPE(C_PTR), VALUE :: invec, inoutvec
20+
INTEGER(KIND=MPI_COUNT_KIND) :: len
21+
TYPE(MPI_Datatype) :: datatype
22+
END SUBROUTINE MPI_User_function_c
23+
END INTERFACE
24+
25+
ABSTRACT INTERFACE
26+
SUBROUTINE MPI_Comm_copy_attr_function(oldcomm, comm_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierror)
27+
use mpi_fortran_integer_types
28+
use mpi_fortran_handle_types
29+
TYPE(MPI_Comm) :: oldcomm
30+
INTEGER :: comm_keyval, ierror
31+
INTEGER(KIND=MPI_ADDRESS_KIND) :: extra_state, attribute_val_in, attribute_val_out
32+
LOGICAL :: flag
33+
END SUBROUTINE MPI_Comm_copy_attr_function
34+
END INTERFACE
35+
36+
ABSTRACT INTERFACE
37+
SUBROUTINE MPI_Comm_delete_attr_function(comm, comm_keyval, attribute_val, extra_state, ierror)
38+
use mpi_fortran_integer_types
39+
use mpi_fortran_handle_types
40+
TYPE(MPI_Comm) :: comm
41+
INTEGER :: comm_keyval, ierror
42+
INTEGER(KIND=MPI_ADDRESS_KIND) :: attribute_val, extra_state
43+
END SUBROUTINE MPI_Comm_delete_attr_function
44+
END INTERFACE
45+
46+
ABSTRACT INTERFACE
47+
SUBROUTINE MPI_Win_copy_attr_function(oldwin, win_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierror)
48+
use mpi_fortran_integer_types
49+
use mpi_fortran_handle_types
50+
TYPE(MPI_Win) :: oldwin
51+
INTEGER :: win_keyval, ierror
52+
INTEGER(KIND=MPI_ADDRESS_KIND) :: extra_state, attribute_val_in, attribute_val_out
53+
LOGICAL :: flag
54+
END SUBROUTINE MPI_Win_copy_attr_function
55+
END INTERFACE
56+
57+
ABSTRACT INTERFACE
58+
SUBROUTINE MPI_Win_delete_attr_function(win, win_keyval, attribute_val, extra_state, ierror)
59+
use mpi_fortran_integer_types
60+
use mpi_fortran_handle_types
61+
TYPE(MPI_Win) :: win
62+
INTEGER :: win_keyval, ierror
63+
INTEGER(KIND=MPI_ADDRESS_KIND) :: attribute_val, extra_state
64+
END SUBROUTINE MPI_Win_delete_attr_function
65+
END INTERFACE
66+
67+
ABSTRACT INTERFACE
68+
SUBROUTINE MPI_Type_copy_attr_function(oldtype, type_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierror)
69+
use mpi_fortran_integer_types
70+
use mpi_fortran_handle_types
71+
TYPE(MPI_Datatype) :: oldtype
72+
INTEGER :: type_keyval, ierror
73+
INTEGER(KIND=MPI_ADDRESS_KIND) :: extra_state, attribute_val_in, attribute_val_out
74+
LOGICAL :: flag
75+
END SUBROUTINE MPI_Type_copy_attr_function
76+
END INTERFACE
77+
78+
ABSTRACT INTERFACE
79+
SUBROUTINE MPI_Type_delete_attr_function(type, type_keyval, attribute_val, extra_state, ierror)
80+
use mpi_fortran_integer_types
81+
use mpi_fortran_handle_types
82+
TYPE(MPI_Datatype) :: type
83+
INTEGER :: type_keyval, ierror
84+
INTEGER(KIND=MPI_ADDRESS_KIND) :: attribute_val, extra_state
85+
END SUBROUTINE MPI_Type_delete_attr_function
86+
END INTERFACE
87+
88+
ABSTRACT INTERFACE
89+
SUBROUTINE MPI_Comm_errhandler_function(comm, error_code)
90+
use mpi_fortran_handle_types
91+
TYPE(MPI_Comm) :: comm
92+
INTEGER :: error_code
93+
END SUBROUTINE MPI_Comm_errhandler_function
94+
END INTERFACE
95+
96+
ABSTRACT INTERFACE
97+
SUBROUTINE MPI_Win_errhandler_function(win, error_code)
98+
use mpi_fortran_handle_types
99+
TYPE(MPI_Win) :: win
100+
INTEGER :: error_code
101+
END SUBROUTINE MPI_Win_errhandler_function
102+
END INTERFACE
103+
104+
ABSTRACT INTERFACE
105+
SUBROUTINE MPI_File_errhandler_function(file, error_code)
106+
use mpi_fortran_handle_types
107+
TYPE(MPI_File) :: file
108+
INTEGER :: error_code
109+
END SUBROUTINE MPI_File_errhandler_function
110+
END INTERFACE
111+
112+
ABSTRACT INTERFACE
113+
SUBROUTINE MPI_Session_errhandler_function(session, error_code)
114+
use mpi_fortran_handle_types
115+
TYPE(MPI_Session) :: session
116+
INTEGER :: error_code
117+
END SUBROUTINE MPI_Session_errhandler_function
118+
END INTERFACE
119+
120+
ABSTRACT INTERFACE
121+
SUBROUTINE MPI_Grequest_query_function(extra_state, status, ierror)
122+
use mpi_fortran_integer_types, only: MPI_ADDRESS_KIND
123+
use mpi_fortran_status, only: MPI_Status
124+
INTEGER(KIND=MPI_ADDRESS_KIND) :: extra_state
125+
TYPE(MPI_Status) :: status
126+
INTEGER :: ierror
127+
END SUBROUTINE MPI_Grequest_query_function
128+
END INTERFACE
129+
130+
ABSTRACT INTERFACE
131+
SUBROUTINE MPI_Grequest_free_function(extra_state, ierror)
132+
use mpi_fortran_integer_types
133+
use mpi_fortran_handle_types
134+
INTEGER(KIND=MPI_ADDRESS_KIND) :: extra_state
135+
INTEGER :: ierror
136+
END SUBROUTINE MPI_Grequest_free_function
137+
END INTERFACE
138+
139+
ABSTRACT INTERFACE
140+
SUBROUTINE MPI_Grequest_cancel_function(extra_state, complete, ierror)
141+
use mpi_fortran_integer_types
142+
use mpi_fortran_handle_types
143+
INTEGER(KIND=MPI_ADDRESS_KIND) :: extra_state
144+
LOGICAL :: complete
145+
INTEGER :: ierror
146+
END SUBROUTINE MPI_Grequest_cancel_function
147+
END INTERFACE
148+
149+
ABSTRACT INTERFACE
150+
SUBROUTINE MPI_Datarep_extent_function(datatype, extent, extra_state, ierror)
151+
use mpi_fortran_integer_types
152+
use mpi_fortran_handle_types
153+
TYPE(MPI_Datatype) :: datatype
154+
INTEGER(KIND=MPI_ADDRESS_KIND) :: extent, extra_state
155+
INTEGER :: ierror
156+
END SUBROUTINE MPI_Datarep_extent_function
157+
END INTERFACE
158+
159+
ABSTRACT INTERFACE
160+
SUBROUTINE MPI_Datarep_conversion_function(userbuf, datatype, count, filebuf, position, extra_state, ierror)
161+
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
162+
use mpi_fortran_integer_types
163+
use mpi_fortran_handle_types
164+
TYPE(C_PTR), VALUE :: userbuf, filebuf
165+
TYPE(MPI_Datatype) :: datatype
166+
INTEGER :: count, ierror
167+
INTEGER(KIND=MPI_OFFSET_KIND) :: position
168+
INTEGER(KIND=MPI_ADDRESS_KIND) :: extra_state
169+
END SUBROUTINE MPI_Datarep_conversion_function
170+
END INTERFACE
171+
172+
ABSTRACT INTERFACE
173+
SUBROUTINE MPI_Datarep_conversion_function_c(userbuf, datatype, count, filebuf, position, extra_state, ierror) !(_c)
174+
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
175+
use mpi_fortran_integer_types
176+
use mpi_fortran_handle_types
177+
TYPE(C_PTR), VALUE :: userbuf, filebuf
178+
TYPE(MPI_Datatype) :: datatype
179+
INTEGER(KIND=MPI_COUNT_KIND) :: count
180+
INTEGER(KIND=MPI_OFFSET_KIND) :: position
181+
INTEGER(KIND=MPI_ADDRESS_KIND) :: extra_state
182+
INTEGER :: ierror
183+
END SUBROUTINE MPI_Datarep_conversion_function_c
184+
END INTERFACE
185+
186+
end module mpi_fortran_callback_prototypes

0 commit comments

Comments
 (0)