@@ -286,10 +286,10 @@ static void MPI_Recv_fortran_wrapper(MPI_Fint *buf, MPI_Fint *count, MPI_Fint *d
286
286
#if (!defined(MPICH_HAS_C2F ) && defined(MPICH_NAME ) && (MPICH_NAME == 1 )) /* MPICH test */
287
287
_wrap_py_return_val = PMPI_Recv ((void * )buf , * count , (MPI_Datatype )(* datatype ), * source , * tag , (MPI_Comm )(* comm ), (MPI_Status * )status );
288
288
#else /* MPI-2 safe call */
289
- // MPI_Status temp_status;
289
+ MPI_Status temp_status ;
290
290
//MPI_Status_f2c(status, &temp_status);
291
291
_wrap_py_return_val = PMPI_Recv ((void * )buf , * count , MPI_Type_f2c (* datatype ), * source , * tag , MPI_Comm_f2c (* comm ), (MPI_Status * )status );
292
- // MPI_Status_c2f(&temp_status, status);
292
+ MPI_Status_c2f (& temp_status , status );
293
293
#endif /* MPICH test */
294
294
295
295
Tsc const duration = rdtsc () - tsc ;
@@ -575,8 +575,8 @@ static void MPI_Test_fortran_wrapper(MPI_Fint *request, MPI_Fint *flag, MPI_Fint
575
575
MPI_Request temp_request ;
576
576
MPI_Status temp_status ;
577
577
temp_request = MPI_Request_f2c (* request );
578
- MPI_Status_f2c (status , & temp_status );
579
- _wrap_py_return_val = PMPI_Test (& temp_request , (int * )flag , & temp_status );
578
+ // MPI_Status_f2c(status, &temp_status);
579
+ _wrap_py_return_val = PMPI_Test (& temp_request , (int * )flag , ( MPI_Status * ) status );
580
580
* request = MPI_Request_c2f (temp_request );
581
581
MPI_Status_c2f (& temp_status , status );
582
582
#endif /* MPICH test */
@@ -626,6 +626,7 @@ _EXTERN_C_ void mpi_test__(MPI_Fint *request, MPI_Fint *flag, MPI_Fint *status,
626
626
static void MPI_Wait_fortran_wrapper (MPI_Fint * request , MPI_Fint * status , MPI_Fint * ierr ) {
627
627
int _wrap_py_return_val = 0 ;
628
628
629
+ MpiReq const req = * request ;
629
630
Tsc const tsc = rdtsc ();
630
631
631
632
#if (!defined(MPICH_HAS_C2F ) && defined(MPICH_NAME ) && (MPICH_NAME == 1 )) /* MPICH test */
@@ -634,7 +635,7 @@ static void MPI_Wait_fortran_wrapper(MPI_Fint *request, MPI_Fint *status, MPI_Fi
634
635
MPI_Request temp_request ;
635
636
MPI_Status temp_status ;
636
637
temp_request = MPI_Request_f2c (* request );
637
- MPI_Status_f2c (status , & temp_status );
638
+ // MPI_Status_f2c(status, &temp_status);
638
639
_wrap_py_return_val = PMPI_Wait (& temp_request , & temp_status );
639
640
* request = MPI_Request_c2f (temp_request );
640
641
MPI_Status_c2f (& temp_status , status );
@@ -652,7 +653,7 @@ static void MPI_Wait_fortran_wrapper(MPI_Fint *request, MPI_Fint *status, MPI_Fi
652
653
.nb_bytes_s = 0 ,
653
654
.nb_bytes_r = 0 ,
654
655
.comm = -1 ,
655
- .req = * request ,
656
+ .req = req ,
656
657
.tag = -1 ,
657
658
.required_thread_lvl = -1 ,
658
659
.provided_thread_lvl = -1 ,
@@ -798,4 +799,64 @@ _EXTERN_C_ void mpi_igather_(MPI_Fint *sendbuf, MPI_Fint *sendcount, MPI_Fint *s
798
799
799
800
_EXTERN_C_ void mpi_igather__ (MPI_Fint * sendbuf , MPI_Fint * sendcount , MPI_Fint * sendtype , MPI_Fint * recvbuf , MPI_Fint * recvcount , MPI_Fint * recvtype , MPI_Fint * root , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) {
800
801
MPI_Igather_fortran_wrapper (sendbuf , sendcount , sendtype , recvbuf , recvcount , recvtype , root , comm , request , ierr );
802
+ }
803
+
804
+
805
+ static void MPI_Iscatter_fortran_wrapper (MPI_Fint * sendbuf , MPI_Fint * sendcount , MPI_Fint * sendtype , MPI_Fint * recvbuf , MPI_Fint * recvcount , MPI_Fint * recvtype , MPI_Fint * root , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) {
806
+ int _wrap_py_return_val = 0 ;
807
+
808
+ Tsc const tsc = rdtsc ();
809
+
810
+ #if (!defined(MPICH_HAS_C2F ) && defined(MPICH_NAME ) && (MPICH_NAME == 1 )) /* MPICH test */
811
+ _wrap_py_return_val = MPI_Iscatter ((const void * )sendbuf , * sendcount , (MPI_Datatype )(* sendtype ), (void * )recvbuf , * recvcount , (MPI_Datatype )(* recvtype ), * root , (MPI_Comm )(* comm ), (MPI_Request * )request );
812
+ #else /* MPI-2 safe call */
813
+ MPI_Request temp_request ;
814
+ temp_request = MPI_Request_f2c (* request );
815
+ _wrap_py_return_val = PMPI_Iscatter ((const void * )sendbuf , * sendcount , MPI_Type_f2c (* sendtype ), (void * )recvbuf , * recvcount , MPI_Type_f2c (* recvtype ), * root , MPI_Comm_f2c (* comm ), & temp_request );
816
+ * request = MPI_Request_c2f (temp_request );
817
+ #endif /* MPICH test */
818
+
819
+ Tsc const duration = rdtsc () - tsc ;
820
+
821
+ int nb_bytes_send , nb_bytes_recv ;
822
+ PMPI_Type_size (MPI_Type_f2c (* sendtype ), & nb_bytes_send );
823
+ PMPI_Type_size (MPI_Type_f2c (* recvtype ), & nb_bytes_recv );
824
+
825
+ MpiCall const iscatter = {
826
+ .kind = Iscatter ,
827
+ .time = -1.0 ,
828
+ .tsc = tsc ,
829
+ .duration = duration ,
830
+ .current_rank = current_rank ,
831
+ .partner_rank = * root ,
832
+ .nb_bytes_s = nb_bytes_send * (* sendcount ),
833
+ .nb_bytes_r = nb_bytes_recv * (* recvcount ),
834
+ .comm = PMPI_Comm_c2f ((MPI_Comm )comm ),
835
+ .req = * request ,
836
+ .tag = -1 ,
837
+ .required_thread_lvl = -1 ,
838
+ .provided_thread_lvl = -1 ,
839
+ .op_type = -1 ,
840
+ .finished = false,
841
+ };
842
+
843
+ register_mpi_call (iscatter );
844
+
845
+ * ierr = _wrap_py_return_val ;
846
+ }
847
+
848
+ _EXTERN_C_ void MPI_ISCATTER (MPI_Fint * sendbuf , MPI_Fint * sendcount , MPI_Fint * sendtype , MPI_Fint * recvbuf , MPI_Fint * recvcount , MPI_Fint * recvtype , MPI_Fint * root , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) {
849
+ MPI_Iscatter_fortran_wrapper (sendbuf , sendcount , sendtype , recvbuf , recvcount , recvtype , root , comm , request , ierr );
850
+ }
851
+
852
+ _EXTERN_C_ void mpi_iscatter (MPI_Fint * sendbuf , MPI_Fint * sendcount , MPI_Fint * sendtype , MPI_Fint * recvbuf , MPI_Fint * recvcount , MPI_Fint * recvtype , MPI_Fint * root , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) {
853
+ MPI_Iscatter_fortran_wrapper (sendbuf , sendcount , sendtype , recvbuf , recvcount , recvtype , root , comm , request , ierr );
854
+ }
855
+
856
+ _EXTERN_C_ void mpi_iscatter_ (MPI_Fint * sendbuf , MPI_Fint * sendcount , MPI_Fint * sendtype , MPI_Fint * recvbuf , MPI_Fint * recvcount , MPI_Fint * recvtype , MPI_Fint * root , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) {
857
+ MPI_Iscatter_fortran_wrapper (sendbuf , sendcount , sendtype , recvbuf , recvcount , recvtype , root , comm , request , ierr );
858
+ }
859
+
860
+ _EXTERN_C_ void mpi_iscatter__ (MPI_Fint * sendbuf , MPI_Fint * sendcount , MPI_Fint * sendtype , MPI_Fint * recvbuf , MPI_Fint * recvcount , MPI_Fint * recvtype , MPI_Fint * root , MPI_Fint * comm , MPI_Fint * request , MPI_Fint * ierr ) {
861
+ MPI_Iscatter_fortran_wrapper (sendbuf , sendcount , sendtype , recvbuf , recvcount , recvtype , root , comm , request , ierr );
801
862
}
0 commit comments