diff --git a/oshmem/shmem/fortran/Makefile.am b/oshmem/shmem/fortran/Makefile.am index 6986e7cd0dd..af86e545b14 100644 --- a/oshmem/shmem/fortran/Makefile.am +++ b/oshmem/shmem/fortran/Makefile.am @@ -69,6 +69,7 @@ liboshmem_fortran_la_SOURCES += \ shmem_iput8_f.c \ shmem_logical_iput_f.c \ shmem_real_iput_f.c \ + shmem_put_nb_f.c \ shmem_character_get_f.c \ shmem_complex_get_f.c \ shmem_double_get_f.c \ @@ -91,6 +92,7 @@ liboshmem_fortran_la_SOURCES += \ shmem_integer_iget_f.c \ shmem_logical_iget_f.c \ shmem_real_iget_f.c \ + shmem_get_nb_f.c \ shmem_swap_f.c \ shmem_int4_swap_f.c \ shmem_int8_swap_f.c \ diff --git a/oshmem/shmem/fortran/profile/Makefile.am b/oshmem/shmem/fortran/profile/Makefile.am index 8d0c4669381..06b3515d8f8 100644 --- a/oshmem/shmem/fortran/profile/Makefile.am +++ b/oshmem/shmem/fortran/profile/Makefile.am @@ -61,6 +61,7 @@ nodist_liboshmem_fortran_pshmem_la_SOURCES = \ pshmem_iput8_f.c \ pshmem_logical_iput_f.c \ pshmem_real_iput_f.c \ + pshmem_put_nb_f.c \ pshmem_character_get_f.c \ pshmem_complex_get_f.c \ pshmem_double_get_f.c \ @@ -83,6 +84,7 @@ nodist_liboshmem_fortran_pshmem_la_SOURCES = \ pshmem_integer_iget_f.c \ pshmem_logical_iget_f.c \ pshmem_real_iget_f.c \ + pshmem_get_nb_f.c \ pshmem_swap_f.c \ pshmem_int4_swap_f.c \ pshmem_int8_swap_f.c \ diff --git a/oshmem/shmem/fortran/profile/defines.h b/oshmem/shmem/fortran/profile/defines.h index 9cb1979a51b..1693b6a60f1 100644 --- a/oshmem/shmem/fortran/profile/defines.h +++ b/oshmem/shmem/fortran/profile/defines.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Mellanox Technologies, Inc. + * Copyright (c) 2014-2016 Mellanox Technologies, Inc. * All rights reserved. * $COPYRIGHT$ * @@ -118,6 +118,10 @@ #define shmem_character_put_ pshmem_character_put_ #define shmem_character_put__ pshmem_character_put__ +#define SHMEM_CHARACTER_PUT_NBI PSHMEM_CHARACTER_PUT_NBI +#define shmem_character_put_nbi_ pshmem_character_put_nbi_ +#define shmem_character_put_nbi__ pshmem_character_put_nbi__ + #define SHMEM_COLLECT4 PSHMEM_COLLECT4 #define shmem_collect4_ pshmem_collect4_ #define shmem_collect4__ pshmem_collect4__ @@ -166,6 +170,10 @@ #define shmem_complex_put_ pshmem_complex_put_ #define shmem_complex_put__ pshmem_complex_put__ +#define SHMEM_COMPLEX_PUT_NBI PSHMEM_COMPLEX_PUT_NBI +#define shmem_complex_put_nbi_ pshmem_complex_put_nbi_ +#define shmem_complex_put_nbi__ pshmem_complex_put_nbi__ + #define SHMEM_DOUBLE_GET PSHMEM_DOUBLE_GET #define shmem_double_get_ pshmem_double_get_ #define shmem_double_get__ pshmem_double_get__ @@ -182,6 +190,10 @@ #define shmem_double_put_ pshmem_double_put_ #define shmem_double_put__ pshmem_double_put__ +#define SHMEM_DOUBLE_PUT_NBI PSHMEM_DOUBLE_PUT_NBI +#define shmem_double_put_nbi_ pshmem_double_put_nbi_ +#define shmem_double_put_nbi__ pshmem_double_put_nbi__ + #define SHMEM_FENCE PSHMEM_FENCE #define shmem_fence_ pshmem_fence_ #define shmem_fence__ pshmem_fence__ @@ -230,6 +242,102 @@ #define shmem_iget8_ pshmem_iget8_ #define shmem_iget8__ pshmem_iget8__ +#define SHMEM_GETMEM_NBI PSHMEM_GETMEM_NBI +#define shmem_getmem_nbi_ pshmem_getmem_nbi_ +#define shmem_getmem_nbi__ pshmem_getmem_nbi__ + +#define SHMEM_CHARACTER_GET_NBI PSHMEM_CHARACTER_GET_NBI +#define shmem_character_get_nbi_ pshmem_character_get_nbi_ +#define shmem_character_get_nbi__ pshmem_character_get_nbi__ + +#define SHMEM_COMPLEX_GET_NBI PSHMEM_COMPLEX_GET_NBI +#define shmem_complex_get_nbi_ pshmem_complex_get_nbi_ +#define shmem_complex_get_nbi__ pshmem_complex_get_nbi__ + +#define SHMEM_DOUBLE_GET_NBI PSHMEM_DOUBLE_GET_NBI +#define shmem_double_get_nbi_ pshmem_double_get_nbi_ +#define shmem_double_get_nbi__ pshmem_double_get_nbi__ + +#define SHMEM_INTEGER_GET_NBI PSHMEM_INTEGER_GET_NBI +#define shmem_integer_get_nbi_ pshmem_integer_get_nbi_ +#define shmem_integer_get_nbi__ pshmem_integer_get_nbi__ + +#define SHMEM_LOGICAL_GET_NBI PSHMEM_LOGICAL_GET_NBI +#define shmem_logical_get_nbi_ pshmem_logical_get_nbi_ +#define shmem_logical_get_nbi__ pshmem_logical_get_nbi__ + +#define SHMEM_REAL_GET_NBI PSHMEM_REAL_GET_NBI +#define shmem_real_get_nbi_ pshmem_real_get_nbi_ +#define shmem_real_get_nbi__ pshmem_real_get_nbi__ + +#define SHMEM_GET4_NBI PSHMEM_GET4_NBI +#define shmem_get4_nbi_ pshmem_get4_nbi_ +#define shmem_get4_nbi__ pshmem_get4_nbi__ + +#define SHMEM_GET8_NBI PSHMEM_GET8_NBI +#define shmem_get8_nbi_ pshmem_get8_nbi_ +#define shmem_get8_nbi__ pshmem_get8_nbi__ + +#define SHMEM_GET32_NBI PSHMEM_GET32_NBI +#define shmem_get32_nbi_ pshmem_get32_nbi_ +#define shmem_get32_nbi__ pshmem_get32_nbi__ + +#define SHMEM_GET64_NBI PSHMEM_GET64_NBI +#define shmem_get64_nbi_ pshmem_get64_nbi_ +#define shmem_get64_nbi__ pshmem_get64_nbi__ + +#define SHMEM_GET128_NBI PSHMEM_GET128_NBI +#define shmem_get128_nbi_ pshmem_get128_nbi_ +#define shmem_get128_nbi__ pshmem_get128_nbi__ + +#define SHMEM_PUTMEM_NBI PSHMEM_PUTMEM_NBI +#define shmem_putmem_nbi_ pshmem_putmem_nbi_ +#define shmem_putmem_nbi__ pshmem_putmem_nbi__ + +#define SHMEM_CHARACTER_PUT_NBI PSHMEM_CHARACTER_PUT_NBI +#define shmem_character_put_nbi_ pshmem_character_put_nbi_ +#define shmem_character_put_nbi__ pshmem_character_put_nbi__ + +#define SHMEM_COMPLEX_PUT_NBI PSHMEM_COMPLEX_PUT_NBI +#define shmem_complex_put_nbi_ pshmem_complex_put_nbi_ +#define shmem_complex_put_nbi__ pshmem_complex_put_nbi__ + +#define SHMEM_DOUBLE_PUT_NBI PSHMEM_DOUBLE_PUT_NBI +#define shmem_double_put_nbi_ pshmem_double_put_nbi_ +#define shmem_double_put_nbi__ pshmem_double_put_nbi__ + +#define SHMEM_INTEGER_PUT_NBI PSHMEM_INTEGER_PUT_NBI +#define shmem_integer_put_nbi_ pshmem_integer_put_nbi_ +#define shmem_integer_put_nbi__ pshmem_integer_put_nbi__ + +#define SHMEM_LOGICAL_PUT_NBI PSHMEM_LOGICAL_PUT_NBI +#define shmem_logical_put_nbi_ pshmem_logical_put_nbi_ +#define shmem_logical_put_nbi__ pshmem_logical_put_nbi__ + +#define SHMEM_REAL_PUT_NBI PSHMEM_REAL_PUT_NBI +#define shmem_real_put_nbi_ pshmem_real_put_nbi_ +#define shmem_real_put_nbi__ pshmem_real_put_nbi__ + +#define SHMEM_PUT4_NBI PSHMEM_PUT4_NBI +#define shmem_put4_nbi_ pshmem_put4_nbi_ +#define shmem_put4_nbi__ pshmem_put4_nbi__ + +#define SHMEM_PUT8_NBI PSHMEM_PUT8_NBI +#define shmem_put8_nbi_ pshmem_put8_nbi_ +#define shmem_put8_nbi__ pshmem_put8_nbi__ + +#define SHMEM_PUT32_NBI PSHMEM_PUT32_NBI +#define shmem_put32_nbi_ pshmem_put32_nbi_ +#define shmem_put32_nbi__ pshmem_put32_nbi__ + +#define SHMEM_PUT64_NBI PSHMEM_PUT64_NBI +#define shmem_put64_nbi_ pshmem_put64_nbi_ +#define shmem_put64_nbi__ pshmem_put64_nbi__ + +#define SHMEM_PUT128_NBI PSHMEM_PUT128_NBI +#define shmem_put128_nbi_ pshmem_put128_nbi_ +#define shmem_put128_nbi__ pshmem_put128_nbi__ + #define SHMEM_INT4_ADD PSHMEM_INT4_ADD #define shmem_int4_add_ pshmem_int4_add_ #define shmem_int4_add__ pshmem_int4_add__ diff --git a/oshmem/shmem/fortran/profile/prototypes_pshmem.h b/oshmem/shmem/fortran/profile/prototypes_pshmem.h index 98e2ceeafba..98069dc0a41 100644 --- a/oshmem/shmem/fortran/profile/prototypes_pshmem.h +++ b/oshmem/shmem/fortran/profile/prototypes_pshmem.h @@ -36,6 +36,7 @@ PN (void, pshpclmove, PSHPCLMOVE, (FORTRAN_POINTER_T *addr, MPI_Fint *length, MP PN (FORTRAN_POINTER_T*, pshmem_ptr, PSHMEM_PTR, (FORTRAN_POINTER_T target, MPI_Fint *pe)); PN (ompi_fortran_logical_t, pshmem_pe_accessible, PSHMEM_PE_ACCESSIBLE, (MPI_Fint *pe)); PN (MPI_Fint, pshmem_addr_accessible, PSHMEM_ADDR_ACCESSIBLE, (FORTRAN_POINTER_T addr, MPI_Fint *pe)); + PN (void, pshmem_put, PSHMEM_PUT, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); PN (void, pshmem_character_put, PSHMEM_CHARACTER_PUT, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); PN (void, pshmem_complex_put, PSHMEM_COMPLEX_PUT, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); @@ -49,6 +50,7 @@ PN (void, pshmem_put32, PSHMEM_PUT32, (FORTRAN_POINTER_T target, FORTRAN_POINTER PN (void, pshmem_put64, PSHMEM_PUT64, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); PN (void, pshmem_put128, PSHMEM_PUT128, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); PN (void, pshmem_putmem, PSHMEM_PUTMEM, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); + PN (void, pshmem_iput4, PSHMEM_IPUT4, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); PN (void, pshmem_iput8, PSHMEM_IPUT8, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); PN (void, pshmem_iput32, PSHMEM_IPUT32, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); @@ -59,6 +61,20 @@ PN (void, pshmem_double_iput, PSHMEM_DOUBLE_IPUT, (FORTRAN_POINTER_T target, FOR PN (void, pshmem_integer_iput, PSHMEM_INTEGER_IPUT, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); PN (void, pshmem_logical_iput, PSHMEM_LOGICAL_IPUT, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); PN (void, pshmem_real_iput, PSHMEM_REAL_IPUT, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); + +PN (void, pshmem_putmem_nbi, PSHMEM_PUTMEM_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, pshmem_character_put_nbi, PSHMEM_CHARACTER_PUT_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, pshmem_complex_put_nbi, PSHMEM_COMPLEX_PUT_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, pshmem_double_put_nbi, PSHMEM_DOUBLE_PUT_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, pshmem_integer_put_nbi, PSHMEM_INTEGER_PUT_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, pshmem_logical_put_nbi, PSHMEM_LOGICAL_PUT_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, pshmem_real_put_nbi, PSHMEM_REAL_PUT_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, pshmem_put4_nbi, PSHMEM_PUT4_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, pshmem_put8_nbi, PSHMEM_PUT8_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, pshmem_put32_nbi, PSHMEM_PUT32_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, pshmem_put64_nbi, PSHMEM_PUT64_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, pshmem_put128_nbi, PSHMEM_PUT128_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); + PN (void, pshmem_character_get, PSHMEM_CHARACTER_GET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); PN (void, pshmem_complex_get, PSHMEM_COMPLEX_GET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); PN (void, pshmem_double_get, PSHMEM_DOUBLE_GET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); @@ -71,6 +87,7 @@ PN (void, pshmem_get128, PSHMEM_GET128, (FORTRAN_POINTER_T target, FORTRAN_POINT PN (void, pshmem_getmem, PSHMEM_GETMEM, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); PN (void, pshmem_logical_get, PSHMEM_LOGICAL_GET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); PN (void, pshmem_real_get, PSHMEM_REAL_GET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); + PN (void, pshmem_iget4, PSHMEM_IGET4, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); PN (void, pshmem_iget8, PSHMEM_IGET8, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); PN (void, pshmem_iget32, PSHMEM_IGET32, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); @@ -81,6 +98,20 @@ PN (void, pshmem_double_iget, PSHMEM_DOUBLE_IGET, (FORTRAN_POINTER_T target, FOR PN (void, pshmem_integer_iget, PSHMEM_INTEGER_IGET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); PN (void, pshmem_logical_iget, PSHMEM_LOGICAL_IGET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); PN (void, pshmem_real_iget, PSHMEM_REAL_IGET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); + +PN (void, pshmem_getmem_nbi, PSHMEM_GETMEM_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, pshmem_character_get_nbi, PSHMEM_CHARACTER_GET_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, pshmem_complex_get_nbi, PSHMEM_COMPLEX_GET_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, pshmem_double_get_nbi, PSHMEM_DOUBLE_GET_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, pshmem_integer_get_nbi, PSHMEM_INTEGER_GET_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, pshmem_logical_get_nbi, PSHMEM_LOGICAL_GET_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, pshmem_real_get_nbi, PSHMEM_REAL_GET_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, pshmem_get4_nbi, PSHMEM_GET4_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, pshmem_get8_nbi, PSHMEM_GET8_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, pshmem_get32_nbi, PSHMEM_GET32_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, pshmem_get64_nbi, PSHMEM_GET64_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, pshmem_get128_nbi, PSHMEM_GET128_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); + PN (MPI_Fint, pshmem_swap, PSHMEM_SWAP, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe)); PN (ompi_fortran_integer4_t, pshmem_int4_swap, PSHMEM_INT4_SWAP, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe)); PN (ompi_fortran_integer8_t, pshmem_int8_swap, PSHMEM_INT8_SWAP, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe)); diff --git a/oshmem/shmem/fortran/prototypes_shmem.h b/oshmem/shmem/fortran/prototypes_shmem.h index 96c9c43be87..f16bb6ef2b5 100644 --- a/oshmem/shmem/fortran/prototypes_shmem.h +++ b/oshmem/shmem/fortran/prototypes_shmem.h @@ -39,6 +39,7 @@ PN (void, shpclmove, SHPCLMOVE, (FORTRAN_POINTER_T *addr, MPI_Fint *length, MPI_ PN (FORTRAN_POINTER_T*, shmem_ptr, SHMEM_PTR, (FORTRAN_POINTER_T target, MPI_Fint *pe)); PN (ompi_fortran_logical_t, shmem_pe_accessible, SHMEM_PE_ACCESSIBLE, (MPI_Fint *pe)); PN (MPI_Fint, shmem_addr_accessible, SHMEM_ADDR_ACCESSIBLE, (FORTRAN_POINTER_T addr, MPI_Fint *pe)); + PN (void, shmem_put, SHMEM_PUT, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); PN (void, shmem_character_put, SHMEM_CHARACTER_PUT, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); PN (void, shmem_complex_put, SHMEM_COMPLEX_PUT, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); @@ -52,6 +53,7 @@ PN (void, shmem_put32, SHMEM_PUT32, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T PN (void, shmem_put64, SHMEM_PUT64, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); PN (void, shmem_put128, SHMEM_PUT128, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); PN (void, shmem_putmem, SHMEM_PUTMEM, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); + PN (void, shmem_iput4, SHMEM_IPUT4, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); PN (void, shmem_iput8, SHMEM_IPUT8, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); PN (void, shmem_iput32, SHMEM_IPUT32, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); @@ -62,6 +64,20 @@ PN (void, shmem_double_iput, SHMEM_DOUBLE_IPUT, (FORTRAN_POINTER_T target, FORTR PN (void, shmem_integer_iput, SHMEM_INTEGER_IPUT, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); PN (void, shmem_logical_iput, SHMEM_LOGICAL_IPUT, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); PN (void, shmem_real_iput, SHMEM_REAL_IPUT, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); + +PN (void, shmem_putmem_nbi, SHMEM_PUTMEM_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, shmem_character_put_nbi, SHMEM_CHARACTER_PUT_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, shmem_complex_put_nbi, SHMEM_COMPLEX_PUT_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, shmem_double_put_nbi, SHMEM_DOUBLE_PUT_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, shmem_integer_put_nbi, SHMEM_INTEGER_PUT_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, shmem_logical_put_nbi, SHMEM_LOGICAL_PUT_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, shmem_real_put_nbi, SHMEM_REAL_PUT_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, shmem_put4_nbi, SHMEM_PUT4_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, shmem_put8_nbi, SHMEM_PUT8_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, shmem_put32_nbi, SHMEM_PUT32_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, shmem_put64_nbi, SHMEM_PUT64_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); +PN (void, shmem_put128_nbi, SHMEM_PUT128_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe)); + PN (void, shmem_character_get, SHMEM_CHARACTER_GET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); PN (void, shmem_complex_get, SHMEM_COMPLEX_GET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); PN (void, shmem_double_get, SHMEM_DOUBLE_GET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); @@ -74,6 +90,7 @@ PN (void, shmem_get128, SHMEM_GET128, (FORTRAN_POINTER_T target, FORTRAN_POINTER PN (void, shmem_getmem, SHMEM_GETMEM, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); PN (void, shmem_logical_get, SHMEM_LOGICAL_GET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); PN (void, shmem_real_get, SHMEM_REAL_GET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); + PN (void, shmem_iget4, SHMEM_IGET4, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); PN (void, shmem_iget8, SHMEM_IGET8, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); PN (void, shmem_iget32, SHMEM_IGET32, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); @@ -84,6 +101,21 @@ PN (void, shmem_double_iget, SHMEM_DOUBLE_IGET, (FORTRAN_POINTER_T target, FORTR PN (void, shmem_integer_iget, SHMEM_INTEGER_IGET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); PN (void, shmem_logical_iget, SHMEM_LOGICAL_IGET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); PN (void, shmem_real_iget, SHMEM_REAL_IGET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)); + +PN (void, shmem_getmem_nbi, SHMEM_GETMEM_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, shmem_character_get_nbi, SHMEM_CHARACTER_GET_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, shmem_complex_get_nbi, SHMEM_COMPLEX_GET_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, shmem_double_get_nbi, SHMEM_DOUBLE_GET_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, shmem_integer_get_nbi, SHMEM_INTEGER_GET_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, shmem_logical_get_nbi, SHMEM_LOGICAL_GET_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, shmem_real_get_nbi, SHMEM_REAL_GET_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, shmem_get4_nbi, SHMEM_GET4_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, shmem_get8_nbi, SHMEM_GET8_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, shmem_get32_nbi, SHMEM_GET32_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, shmem_get64_nbi, SHMEM_GET64_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); +PN (void, shmem_get128_nbi, SHMEM_GET128_NBI, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe)); + + PN (MPI_Fint, shmem_swap, SHMEM_SWAP, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe)); PN (ompi_fortran_integer4_t, shmem_int4_swap, SHMEM_INT4_SWAP, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe)); PN (ompi_fortran_integer8_t, shmem_int8_swap, SHMEM_INT8_SWAP, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe)); diff --git a/oshmem/shmem/fortran/shmem_get_nb_f.c b/oshmem/shmem/fortran/shmem_get_nb_f.c new file mode 100644 index 00000000000..561ef0a232c --- /dev/null +++ b/oshmem/shmem/fortran/shmem_get_nb_f.c @@ -0,0 +1,250 @@ + /* + * Copyright (c) 2016 Mellanox Technologies, Inc. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "oshmem_config.h" +#include "oshmem/shmem/fortran/bindings.h" +#include "oshmem/include/shmem.h" +#include "oshmem/shmem/shmem_api_logger.h" +#include "oshmem/runtime/runtime.h" +#include "oshmem/mca/spml/spml.h" +#include "ompi/datatype/ompi_datatype.h" +#include "stdio.h" + +#if OSHMEM_PROFILING +#include "oshmem/shmem/fortran/profile/pbindings.h" + +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_GETMEM_NBI, shmem_getmem_nbi) + +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_CHARACTER_GET_NBI, shmem_character_get_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_COMPLEX_GET_NBI, shmem_complex_get_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_DOUBLE_GET_NBI, shmem_double_get_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_INTEGER_GET_NBI, shmem_integer_get_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_LOGICAL_GET_NBI, shmem_logical_get_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_REAL_GET_NBI, shmem_real_get_nbi) + +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_GET4_NBI, shmem_get4_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_GET8_NBI, shmem_get8_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_GET32_NBI, shmem_get32_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_GET64_NBI, shmem_get64_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_GET128_NBI, shmem_get128_nbi) + +#include "oshmem/shmem/fortran/profile/defines.h" +#endif + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_GETMEM_NBI, + shmem_getmem_nbi_, + shmem_getmem_nbi__, + shmem_getmem_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe), + (target,source,len,pe) ) + +void shmem_getmem_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe) +{ + MCA_SPML_CALL(get_nb(FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*len), + FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_CHARACTER_GET_NBI, + shmem_character_get_nbi_, + shmem_character_get_nbi__, + shmem_character_get_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe), + (target,source,len,pe)) + +void shmem_character_get_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe) +{ + size_t character_type_size = 0; + ompi_datatype_type_size(&ompi_mpi_character.dt, &character_type_size); + + MCA_SPML_CALL(get_nb(FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*len) * character_type_size, + FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_COMPLEX_GET_NBI, + shmem_complex_get_nbi_, + shmem_complex_get_nbi__, + shmem_complex_get_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe), + (target,source,len,pe) ) + +void shmem_complex_get_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe) +{ + size_t complex_type_size = 0; + ompi_datatype_type_size(&ompi_mpi_cplex.dt, &complex_type_size); + + MCA_SPML_CALL(get_nb(FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*len) * complex_type_size, + FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_DOUBLE_GET_NBI, + shmem_double_get_nbi_, + shmem_double_get_nbi__, + shmem_double_get_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe), + (target,source,len,pe) ) + +void shmem_double_get_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe) +{ + size_t double_type_size = 0; + ompi_datatype_type_size(&ompi_mpi_dblprec.dt, &double_type_size); + + MCA_SPML_CALL(get_nb(FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*len) * double_type_size, + FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_INTEGER_GET_NBI, + shmem_integer_get_nbi_, + shmem_integer_get_nbi__, + shmem_integer_get_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe), + (target,source,len,pe) ) + +void shmem_integer_get_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe) +{ + size_t integer_type_size = 0; + ompi_datatype_type_size(&ompi_mpi_integer.dt, &integer_type_size); + + MCA_SPML_CALL(get_nb(FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*len) * integer_type_size, + FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_LOGICAL_GET_NBI, + shmem_logical_get_nbi_, + shmem_logical_get_nbi__, + shmem_logical_get_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe), + (target,source,len,pe) ) + +void shmem_logical_get_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe) +{ + size_t logical_type_size = 0; + ompi_datatype_type_size(&ompi_mpi_logical.dt, &logical_type_size); + + MCA_SPML_CALL(get_nb(FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*len) * logical_type_size, + FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_REAL_GET_NBI, + shmem_real_get_nbi_, + shmem_real_get_nbi__, + shmem_real_get_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe), + (target,source,len,pe) ) + +void shmem_real_get_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe) +{ + size_t real_type_size = 0; + ompi_datatype_type_size(&ompi_mpi_real.dt, &real_type_size); + + MCA_SPML_CALL(get_nb(FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*len) * real_type_size, + FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*pe), NULL)); +} + + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_GET4_NBI, + shmem_get4_nbi_, + shmem_get4_nbi__, + shmem_get4_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe), + (target,source,len,pe) ) + +void shmem_get4_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe) +{ + MCA_SPML_CALL(get_nb(FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*len) * 4, + FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_GET8_NBI, + shmem_get8_nbi_, + shmem_get8_nbi__, + shmem_get8_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe), + (target,source,len,pe) ) + +void shmem_get8_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe) +{ + MCA_SPML_CALL(get_nb(FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*len) * 8, + FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_GET32_NBI, + shmem_get32_nbi_, + shmem_get32_nbi__, + shmem_get32_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe), + (target,source,len,pe) ) + +void shmem_get32_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe) +{ + MCA_SPML_CALL(get_nb(FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*len) * 4, + FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_GET64_NBI, + shmem_get64_nbi_, + shmem_get64_nbi__, + shmem_get64_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe), + (target,source,len,pe) ) + +void shmem_get64_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe) +{ + MCA_SPML_CALL(get_nb(FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*len) * 8, + FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_GET128_NBI, + shmem_get128_nbi_, + shmem_get128_nbi__, + shmem_get128_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe), + (target,source,len,pe) ) + +void shmem_get128_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *len, MPI_Fint *pe) +{ + MCA_SPML_CALL(get_nb(FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*len) * 16, + FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*pe), NULL)); +} diff --git a/oshmem/shmem/fortran/shmem_put_nb_f.c b/oshmem/shmem/fortran/shmem_put_nb_f.c new file mode 100644 index 00000000000..3acff9c118a --- /dev/null +++ b/oshmem/shmem/fortran/shmem_put_nb_f.c @@ -0,0 +1,248 @@ +/* + * Copyright (c) 2016 Mellanox Technologies, Inc. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "oshmem_config.h" +#include "oshmem/shmem/fortran/bindings.h" +#include "oshmem/include/shmem.h" +#include "oshmem/shmem/shmem_api_logger.h" +#include "oshmem/runtime/runtime.h" +#include "ompi/datatype/ompi_datatype.h" +#include "stdio.h" + +#if OSHMEM_PROFILING +#include "oshmem/shmem/fortran/profile/pbindings.h" + +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_PUTMEM_NBI, shmem_putmem_nbi) + +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_CHARACTER_PUT_NBI, shmem_character_put_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_COMPLEX_PUT_NBI, shmem_complex_put_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_DOUBLE_PUT_NBI, shmem_double_put_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_INTEGER_PUT_NBI, shmem_integer_put_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_LOGICAL_PUT_NBI, shmem_logical_put_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_REAL_PUT_NBI, shmem_real_put_nbi) + +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_PUT4_NBI, shmem_put4_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_PUT8_NBI, shmem_put8_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_PUT32_NBI, shmem_put32_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_PUT64_NBI, shmem_put64_nbi) +SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_PUT128_NBI, shmem_put128_nbi) + +#include "oshmem/shmem/fortran/profile/defines.h" +#endif + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_PUTMEM_NBI, + shmem_putmem_nbi_, + shmem_putmem_nbi__, + shmem_putmem_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe), + (target,source,length,pe) ) + +void shmem_putmem_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe) +{ + MCA_SPML_CALL(put_nb(FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*length), + FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_CHARACTER_PUT_NBI, + shmem_character_put_nbi_, + shmem_character_put_nbi__, + shmem_character_put_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe), + (target,source,length,pe) ) + +void shmem_character_put_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe) +{ + size_t character_type_size = 0; + ompi_datatype_type_size(&ompi_mpi_character.dt, &character_type_size); + + MCA_SPML_CALL(put_nb(FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*length) * character_type_size, + FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_COMPLEX_PUT_NBI, + shmem_complex_put_nbi_, + shmem_complex_put_nbi__, + shmem_complex_put_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe), + (target,source,length,pe) ) + +void shmem_complex_put_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe) +{ + size_t complex_type_size = 0; + ompi_datatype_type_size(&ompi_mpi_cplex.dt, &complex_type_size); + + MCA_SPML_CALL(put_nb(FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*length) * complex_type_size, + FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_DOUBLE_PUT_NBI, + shmem_double_put_nbi_, + shmem_double_put_nbi__, + shmem_double_put_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe), + (target,source,length,pe) ) + +void shmem_double_put_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe) +{ + size_t double_precision_type_size = 0; + ompi_datatype_type_size(&ompi_mpi_dblprec.dt, &double_precision_type_size); + + MCA_SPML_CALL(put_nb(FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*length) * double_precision_type_size, + FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_INTEGER_PUT_NBI, + shmem_integer_put_nbi_, + shmem_integer_put_nbi__, + shmem_integer_put_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe), + (target,source,length,pe) ) + +void shmem_integer_put_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe) +{ + size_t integer_type_size = 0; + ompi_datatype_type_size(&ompi_mpi_integer.dt, &integer_type_size); + + MCA_SPML_CALL(put_nb(FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*length) * integer_type_size, + FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_LOGICAL_PUT_NBI, + shmem_logical_put_nbi_, + shmem_logical_put_nbi__, + shmem_logical_put_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe), + (target,source,length,pe) ) + +void shmem_logical_put_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe) +{ + size_t logical_type_size = 0; + ompi_datatype_type_size(&ompi_mpi_logical.dt, &logical_type_size); + + MCA_SPML_CALL(put_nb(FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*length) * logical_type_size, + FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_REAL_PUT_NBI, + shmem_real_put_nbi_, + shmem_real_put_nbi__, + shmem_real_put_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe), + (target,source,length,pe) ) + +void shmem_real_put_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe) +{ + size_t real_type_size = 0; + ompi_datatype_type_size(&ompi_mpi_real.dt, &real_type_size); + + MCA_SPML_CALL(put_nb(FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*length) * real_type_size, + FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_PUT4_NBI, + shmem_put4_nbi_, + shmem_put4_nbi__, + shmem_put4_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe), + (target,source,length,pe) ) + +void shmem_put4_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe) +{ + MCA_SPML_CALL(put_nb(FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*length) * 4, + FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_PUT8_NBI, + shmem_put8_nbi_, + shmem_put8_nbi__, + shmem_put8_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe), + (target,source,length,pe) ) + +void shmem_put8_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe) +{ + MCA_SPML_CALL(put_nb(FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*length) * 8, + FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_PUT32_NBI, + shmem_put32_nbi_, + shmem_put32_nbi__, + shmem_put32_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe), + (target,source,length,pe) ) + +void shmem_put32_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe) +{ + MCA_SPML_CALL(put_nb(FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*length) * 4, + FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_PUT64_NBI, + shmem_put64_nbi_, + shmem_put64_nbi__, + shmem_put64_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe), + (target,source,length,pe) ) + +void shmem_put64_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe) +{ + MCA_SPML_CALL(put_nb(FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*length) * 8, + FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*pe), NULL)); +} + +SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void, + SHMEM_PUT128_NBI, + shmem_put128_nbi_, + shmem_put128_nbi__, + shmem_put128_nbi_f, + (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe), + (target,source,length,pe) ) + +void shmem_put128_nbi_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *length, MPI_Fint *pe) +{ + MCA_SPML_CALL(put_nb(FPTR_2_VOID_PTR(target), + OMPI_FINT_2_INT(*length) * 16, + FPTR_2_VOID_PTR(source), + OMPI_FINT_2_INT(*pe), NULL)); +}