@@ -1069,9 +1069,6 @@ int MPI_Type_toint(MPI_Datatype datatype) { return (int)(intptr_t)datatype; }
10691069MPI_Win MPI_Win_fromint (int win ) { return (MPI_Win )(intptr_t )win ; }
10701070int MPI_Win_toint (MPI_Win win ) { return (int )(intptr_t )win ; }
10711071
1072- int MPI_Type_create_f90_complex (int p , int r , MPI_Datatype * newtype ) { if (newtype ) * newtype = MPI_COMPLEX ; return MPI_SUCCESS ; }
1073- int MPI_Type_create_f90_integer (int r , MPI_Datatype * newtype ) { if (newtype ) * newtype = MPI_INTEGER ; return MPI_SUCCESS ; }
1074- int MPI_Type_create_f90_real (int p , int r , MPI_Datatype * newtype ) { if (newtype ) * newtype = MPI_REAL ; return MPI_SUCCESS ; }
10751072
10761073/* =========================================================================
10771074 * PMPI Wrappers (Direct 1:1 forwarders to MPI_)
@@ -1822,4 +1819,135 @@ int PMPI_T_pvar_stop(MPI_T_pvar_session session, MPI_T_pvar_handle handle) { ret
18221819int PMPI_T_pvar_write (MPI_T_pvar_session session , MPI_T_pvar_handle handle , const void * buf ) { return MPI_T_pvar_write (session , handle , buf ); }
18231820int PMPI_T_source_get_info (int source_index , char * name , int * name_len , char * desc , int * desc_len , MPI_T_source_order * ordering , MPI_Count * ticks_per_second , MPI_Count * max_ticks , MPI_Info * info ) { return MPI_T_source_get_info (source_index , name , name_len , desc , desc_len , ordering , ticks_per_second , max_ticks , info ); }
18241821int PMPI_T_source_get_num (int * num_sources ) { return MPI_T_source_get_num (num_sources ); }
1825- int PMPI_T_source_get_timestamp (int source_index , MPI_Count * timestamp ) { return MPI_T_source_get_timestamp (source_index , timestamp ); }
1822+ int PMPI_T_source_get_timestamp (int source_index , MPI_Count * timestamp ) { return MPI_T_source_get_timestamp (source_index , timestamp ); }
1823+
1824+
1825+ int MPI_Type_create_f90_complex (int p , int r , MPI_Datatype * newtype ) { if (newtype ) * newtype = MPI_COMPLEX ; return MPI_SUCCESS ; }
1826+ int MPI_Type_create_f90_integer (int r , MPI_Datatype * newtype ) { if (newtype ) * newtype = MPI_INTEGER ; return MPI_SUCCESS ; }
1827+ int MPI_Type_create_f90_real (int p , int r , MPI_Datatype * newtype ) { if (newtype ) * newtype = MPI_REAL ; return MPI_SUCCESS ; }
1828+
1829+ /* =========================================================================
1830+ * Core Fortran Interceptors (Crucial for Linker Resolution)
1831+ * ========================================================================= */
1832+ #define F_FUNC (name ) mpi_##name##_
1833+
1834+ MPI_Comm MPI_Comm_f2c (MPI_Fint comm ) { return (MPI_Comm )(intptr_t )comm ; }
1835+ MPI_Fint MPI_Comm_c2f (MPI_Comm comm ) { return (MPI_Fint )(intptr_t )comm ; }
1836+ MPI_Errhandler MPI_Errhandler_f2c (MPI_Fint errhandler ) { return (MPI_Errhandler )(intptr_t )errhandler ; }
1837+ MPI_Fint MPI_Errhandler_c2f (MPI_Errhandler errhandler ) { return (MPI_Fint )(intptr_t )errhandler ; }
1838+ MPI_Group MPI_Group_f2c (MPI_Fint group ) { return (MPI_Group )(intptr_t )group ; }
1839+ MPI_Fint MPI_Group_c2f (MPI_Group group ) { return (MPI_Fint )(intptr_t )group ; }
1840+ MPI_Info MPI_Info_f2c (MPI_Fint info ) { return (MPI_Info )(intptr_t )info ; }
1841+ MPI_Fint MPI_Info_c2f (MPI_Info info ) { return (MPI_Fint )(intptr_t )info ; }
1842+ MPI_Op MPI_Op_f2c (MPI_Fint op ) { return (MPI_Op )(intptr_t )op ; }
1843+ MPI_Fint MPI_Op_c2f (MPI_Op op ) { return (MPI_Fint )(intptr_t )op ; }
1844+ MPI_Request MPI_Request_f2c (MPI_Fint request ) { return (MPI_Request )(intptr_t )request ; }
1845+ MPI_Fint MPI_Request_c2f (MPI_Request request ) { return (MPI_Fint )(intptr_t )request ; }
1846+ MPI_Datatype MPI_Type_f2c (MPI_Fint datatype ) { return (MPI_Datatype )(intptr_t )datatype ; }
1847+ MPI_Fint MPI_Type_c2f (MPI_Datatype datatype ) { return (MPI_Fint )(intptr_t )datatype ; }
1848+ MPI_Win MPI_Win_f2c (MPI_Fint win ) { return (MPI_Win )(intptr_t )win ; }
1849+ MPI_Fint MPI_Win_c2f (MPI_Win win ) { return (MPI_Fint )(intptr_t )win ; }
1850+ MPI_Message MPI_Message_f2c (MPI_Fint message ) { return (MPI_Message )(intptr_t )message ; }
1851+ MPI_Fint MPI_Message_c2f (MPI_Message message ) { return (MPI_Fint )(intptr_t )message ; }
1852+ MPI_Session MPI_Session_f2c (MPI_Fint session ) { return (MPI_Session )(intptr_t )session ; }
1853+ MPI_Fint MPI_Session_c2f (MPI_Session session ) { return (MPI_Fint )(intptr_t )session ; }
1854+
1855+ /* Environmental Management */
1856+ void F_FUNC (init )(MPI_Fint * ierr ) { * ierr = MPI_SUCCESS ; }
1857+ void F_FUNC (finalize )(MPI_Fint * ierr ) { * ierr = MPI_SUCCESS ; }
1858+ void F_FUNC (initialized )(MPI_Fint * flag , MPI_Fint * ierr ) { * flag = 1 ; * ierr = MPI_SUCCESS ; }
1859+ void F_FUNC (finalized )(MPI_Fint * flag , MPI_Fint * ierr ) { * flag = 0 ; * ierr = MPI_SUCCESS ; }
1860+ void F_FUNC (abort )(MPI_Fint * comm , MPI_Fint * errorcode , MPI_Fint * ierr ) { exit (* errorcode ); }
1861+ double F_FUNC (wtime )(void ) { return MPI_Wtime (); }
1862+ double F_FUNC (wtick )(void ) { return MPI_Wtick (); }
1863+ void F_FUNC (get_processor_name )(char * name , MPI_Fint * resultlen , MPI_Fint * ierr , size_t name_len ) {
1864+ if (name && name_len > 0 ) name [0 ] = 'A' ;
1865+ * resultlen = 1 ;
1866+ * ierr = MPI_SUCCESS ;
1867+ }
1868+
1869+ /* Communicators */
1870+ void F_FUNC (comm_size )(MPI_Fint * comm , MPI_Fint * size , MPI_Fint * ierr ) { * size = 1 ; * ierr = MPI_SUCCESS ; }
1871+ void F_FUNC (comm_rank )(MPI_Fint * comm , MPI_Fint * rank , MPI_Fint * ierr ) { * rank = 0 ; * ierr = MPI_SUCCESS ; }
1872+ void F_FUNC (comm_dup )(MPI_Fint * comm , MPI_Fint * newcomm , MPI_Fint * ierr ) { * newcomm = * comm ; * ierr = MPI_SUCCESS ; }
1873+ void F_FUNC (comm_split )(MPI_Fint * comm , MPI_Fint * color , MPI_Fint * key , MPI_Fint * newcomm , MPI_Fint * ierr ) { * newcomm = * comm ; * ierr = MPI_SUCCESS ; }
1874+ void F_FUNC (comm_free )(MPI_Fint * comm , MPI_Fint * ierr ) { * ierr = MPI_SUCCESS ; }
1875+
1876+ /* Point-to-Point */
1877+ void F_FUNC (send )(void * buf , MPI_Fint * count , MPI_Fint * datatype , MPI_Fint * dest , MPI_Fint * tag , MPI_Fint * comm , MPI_Fint * ierr ) { * ierr = MPI_SUCCESS ; }
1878+ void F_FUNC (recv )(void * buf , MPI_Fint * count , MPI_Fint * datatype , MPI_Fint * source , MPI_Fint * tag , MPI_Fint * comm , MPI_Fint * status , MPI_Fint * ierr ) { * ierr = MPI_SUCCESS ; }
1879+ void F_FUNC (isend )(void * buf , MPI_Fint * count , MPI_Fint * datatype , MPI_Fint * dest , MPI_Fint * tag , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
1880+ void F_FUNC (irecv )(void * buf , MPI_Fint * count , MPI_Fint * datatype , MPI_Fint * source , MPI_Fint * tag , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
1881+ void F_FUNC (probe )(MPI_Fint * source , MPI_Fint * tag , MPI_Fint * comm , MPI_Fint * status , MPI_Fint * ierr ) { * ierr = MPI_SUCCESS ; }
1882+ void F_FUNC (iprobe )(MPI_Fint * source , MPI_Fint * tag , MPI_Fint * comm , MPI_Fint * flag , MPI_Fint * status , MPI_Fint * ierr ) { * flag = 1 ; * ierr = MPI_SUCCESS ; }
1883+ void F_FUNC (get_count )(MPI_Fint * status , MPI_Fint * datatype , MPI_Fint * count , MPI_Fint * ierr ) { * count = 0 ; * ierr = MPI_SUCCESS ; }
1884+ void F_FUNC (sendrecv_replace )(void * buf , MPI_Fint * count , MPI_Fint * datatype , MPI_Fint * dest , MPI_Fint * sendtag , MPI_Fint * source , MPI_Fint * recvtag , MPI_Fint * comm , MPI_Fint * status , MPI_Fint * ierr ) {
1885+ * ierr = MPI_SUCCESS ;
1886+ }
1887+ /* Requests */
1888+ void F_FUNC (wait )(MPI_Fint * request , MPI_Fint * status , MPI_Fint * ierr ) { * ierr = MPI_SUCCESS ; }
1889+ void F_FUNC (waitany )(MPI_Fint * count , MPI_Fint * array_of_requests , MPI_Fint * index , MPI_Fint * status , MPI_Fint * ierr ) { * index = 1 ; * ierr = MPI_SUCCESS ; }
1890+ void F_FUNC (waitall )(MPI_Fint * count , MPI_Fint * array_of_requests , MPI_Fint * array_of_statuses , MPI_Fint * ierr ) { * ierr = MPI_SUCCESS ; }
1891+ void F_FUNC (test )(MPI_Fint * request , MPI_Fint * flag , MPI_Fint * status , MPI_Fint * ierr ) { * flag = 1 ; * ierr = MPI_SUCCESS ; }
1892+ void F_FUNC (testany )(MPI_Fint * count , MPI_Fint * array_of_requests , MPI_Fint * index , MPI_Fint * flag , MPI_Fint * status , MPI_Fint * ierr ) { * flag = 1 ; * index = 1 ; * ierr = MPI_SUCCESS ; }
1893+ void F_FUNC (cancel )(MPI_Fint * request , MPI_Fint * ierr ) { * ierr = MPI_SUCCESS ; }
1894+ void F_FUNC (request_free )(MPI_Fint * request , MPI_Fint * ierr ) { * ierr = MPI_SUCCESS ; }
1895+
1896+ /* Collectives */
1897+ void F_FUNC (allreduce )(void * sendbuf , void * recvbuf , MPI_Fint * count , MPI_Fint * datatype , MPI_Fint * op , MPI_Fint * comm , MPI_Fint * ierr ) {
1898+ * ierr = MPI_Allreduce (sendbuf , recvbuf , * count , MPI_Type_f2c (* datatype ), MPI_Op_f2c (* op ), MPI_Comm_f2c (* comm ));
1899+ }
1900+ void F_FUNC (reduce )(void * sendbuf , void * recvbuf , MPI_Fint * count , MPI_Fint * datatype , MPI_Fint * op , MPI_Fint * root , MPI_Fint * comm , MPI_Fint * ierr ) {
1901+ * ierr = MPI_Reduce (sendbuf , recvbuf , * count , MPI_Type_f2c (* datatype ), MPI_Op_f2c (* op ), * root , MPI_Comm_f2c (* comm ));
1902+ }
1903+ void F_FUNC (bcast )(void * buffer , MPI_Fint * count , MPI_Fint * datatype , MPI_Fint * root , MPI_Fint * comm , MPI_Fint * ierr ) {
1904+ * ierr = MPI_Bcast (buffer , * count , MPI_Type_f2c (* datatype ), * root , MPI_Comm_f2c (* comm ));
1905+ }
1906+ void F_FUNC (gather )(void * sendbuf , MPI_Fint * sendcount , MPI_Fint * sendtype , void * recvbuf , MPI_Fint * recvcount , MPI_Fint * recvtype , MPI_Fint * root , MPI_Fint * comm , MPI_Fint * ierr ) {
1907+ * ierr = MPI_Gather (sendbuf , * sendcount , MPI_Type_f2c (* sendtype ), recvbuf , * recvcount , MPI_Type_f2c (* recvtype ), * root , MPI_Comm_f2c (* comm ));
1908+ }
1909+ void F_FUNC (scatter )(void * sendbuf , MPI_Fint * sendcount , MPI_Fint * sendtype , void * recvbuf , MPI_Fint * recvcount , MPI_Fint * recvtype , MPI_Fint * root , MPI_Fint * comm , MPI_Fint * ierr ) {
1910+ * ierr = MPI_Scatter (sendbuf , * sendcount , MPI_Type_f2c (* sendtype ), recvbuf , * recvcount , MPI_Type_f2c (* recvtype ), * root , MPI_Comm_f2c (* comm ));
1911+ }
1912+ void F_FUNC (allgather )(void * sendbuf , MPI_Fint * sendcount , MPI_Fint * sendtype , void * recvbuf , MPI_Fint * recvcount , MPI_Fint * recvtype , MPI_Fint * comm , MPI_Fint * ierr ) {
1913+ * ierr = MPI_Allgather (sendbuf , * sendcount , MPI_Type_f2c (* sendtype ), recvbuf , * recvcount , MPI_Type_f2c (* recvtype ), MPI_Comm_f2c (* comm ));
1914+ }
1915+ void F_FUNC (alltoall )(void * sendbuf , MPI_Fint * sendcount , MPI_Fint * sendtype , void * recvbuf , MPI_Fint * recvcount , MPI_Fint * recvtype , MPI_Fint * comm , MPI_Fint * ierr ) {
1916+ * ierr = MPI_Alltoall (sendbuf , * sendcount , MPI_Type_f2c (* sendtype ), recvbuf , * recvcount , MPI_Type_f2c (* recvtype ), MPI_Comm_f2c (* comm ));
1917+ }
1918+ void F_FUNC (barrier )(MPI_Fint * comm , MPI_Fint * ierr ) { * ierr = MPI_SUCCESS ; }
1919+ void F_FUNC (reduce_scatter )(void * sendbuf , void * recvbuf , MPI_Fint * recvcounts , MPI_Fint * datatype , MPI_Fint * op , MPI_Fint * comm , MPI_Fint * ierr ) { * ierr = MPI_SUCCESS ; }
1920+ void F_FUNC (ibcast )(void * buffer , MPI_Fint * count , MPI_Fint * datatype , MPI_Fint * root , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
1921+ void F_FUNC (ireduce_scatter )(void * sendbuf , void * recvbuf , MPI_Fint * recvcounts , MPI_Fint * datatype , MPI_Fint * op , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) {
1922+ * request = 0 ;
1923+ * ierr = MPI_SUCCESS ;
1924+ }
1925+ /* Packing */
1926+ void F_FUNC (pack )(void * inbuf , MPI_Fint * incount , MPI_Fint * datatype , void * outbuf , MPI_Fint * outsize , MPI_Fint * position , MPI_Fint * comm , MPI_Fint * ierr ) { * ierr = MPI_SUCCESS ; }
1927+ void F_FUNC (unpack )(void * inbuf , MPI_Fint * insize , MPI_Fint * position , void * outbuf , MPI_Fint * outcount , MPI_Fint * datatype , MPI_Fint * comm , MPI_Fint * ierr ) { * ierr = MPI_SUCCESS ; }
1928+ void F_FUNC (pack_size )(MPI_Fint * incount , MPI_Fint * datatype , MPI_Fint * comm , MPI_Fint * size , MPI_Fint * ierr ) { * size = 0 ; * ierr = MPI_SUCCESS ; }
1929+
1930+ /* Types */
1931+ void F_FUNC (type_contiguous )(MPI_Fint * count , MPI_Fint * oldtype , MPI_Fint * newtype , MPI_Fint * ierr ) { * newtype = * oldtype ; * ierr = MPI_SUCCESS ; }
1932+ void F_FUNC (type_commit )(MPI_Fint * datatype , MPI_Fint * ierr ) { * ierr = MPI_SUCCESS ; }
1933+ void F_FUNC (type_free )(MPI_Fint * datatype , MPI_Fint * ierr ) { * ierr = MPI_SUCCESS ; }
1934+
1935+ /* Ops */
1936+ void F_FUNC (op_create )(void * user_fn , MPI_Fint * commute , MPI_Fint * op , MPI_Fint * ierr ) { * op = 1 ; * ierr = MPI_SUCCESS ; }
1937+ void F_FUNC (op_free )(MPI_Fint * op , MPI_Fint * ierr ) { * ierr = MPI_SUCCESS ; }
1938+
1939+ void F_FUNC (iallgather )(void * sendbuf , MPI_Fint * sendcount , MPI_Fint * sendtype , void * recvbuf , MPI_Fint * recvcount , MPI_Fint * recvtype , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
1940+ void F_FUNC (iallgatherv )(void * sendbuf , MPI_Fint * sendcount , MPI_Fint * sendtype , void * recvbuf , MPI_Fint * recvcounts , MPI_Fint * displs , MPI_Fint * recvtype , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
1941+ void F_FUNC (iallreduce )(void * sendbuf , void * recvbuf , MPI_Fint * count , MPI_Fint * datatype , MPI_Fint * op , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
1942+ void F_FUNC (ialltoall )(void * sendbuf , MPI_Fint * sendcount , MPI_Fint * sendtype , void * recvbuf , MPI_Fint * recvcount , MPI_Fint * recvtype , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
1943+ void F_FUNC (ialltoallv )(void * sendbuf , MPI_Fint * sendcounts , MPI_Fint * sdispls , MPI_Fint * sendtype , void * recvbuf , MPI_Fint * recvcounts , MPI_Fint * rdispls , MPI_Fint * recvtype , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
1944+ void F_FUNC (ialltoallw )(void * sendbuf , MPI_Fint * sendcounts , MPI_Fint * sdispls , MPI_Fint * sendtypes , void * recvbuf , MPI_Fint * recvcounts , MPI_Fint * rdispls , MPI_Fint * recvtypes , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
1945+ void F_FUNC (iexscan )(void * sendbuf , void * recvbuf , MPI_Fint * count , MPI_Fint * datatype , MPI_Fint * op , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
1946+ void F_FUNC (igather )(void * sendbuf , MPI_Fint * sendcount , MPI_Fint * sendtype , void * recvbuf , MPI_Fint * recvcount , MPI_Fint * recvtype , MPI_Fint * root , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
1947+ void F_FUNC (igatherv )(void * sendbuf , MPI_Fint * sendcount , MPI_Fint * sendtype , void * recvbuf , MPI_Fint * recvcounts , MPI_Fint * displs , MPI_Fint * recvtype , MPI_Fint * root , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
1948+ void F_FUNC (ireduce )(void * sendbuf , void * recvbuf , MPI_Fint * count , MPI_Fint * datatype , MPI_Fint * op , MPI_Fint * root , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
1949+ void F_FUNC (iscan )(void * sendbuf , void * recvbuf , MPI_Fint * count , MPI_Fint * datatype , MPI_Fint * op , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
1950+ void F_FUNC (iscatter )(void * sendbuf , MPI_Fint * sendcount , MPI_Fint * sendtype , void * recvbuf , MPI_Fint * recvcount , MPI_Fint * recvtype , MPI_Fint * root , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
1951+ void F_FUNC (iscatterv )(void * sendbuf , MPI_Fint * sendcounts , MPI_Fint * displs , MPI_Fint * sendtype , void * recvbuf , MPI_Fint * recvcount , MPI_Fint * recvtype , MPI_Fint * root , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
1952+ void F_FUNC (ibarrier )(MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
1953+ void F_FUNC (ireduce_scatter_block )(void * sendbuf , void * recvbuf , MPI_Fint * recvcount , MPI_Fint * datatype , MPI_Fint * op , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) { * request = 0 ; * ierr = MPI_SUCCESS ; }
0 commit comments