Skip to content

Commit 7363906

Browse files
committed
io/romio321: make grequest extensions internal
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
1 parent 7aa5177 commit 7363906

File tree

12 files changed

+67
-236
lines changed

12 files changed

+67
-236
lines changed

ompi/include/mpi.h.in

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,6 @@
139139
/* Whether in include MPI-1 compatibility */
140140
#undef OMPI_ENABLE_MPI1_COMPAT
141141

142-
/* Whether we support Grequest extensions */
143-
#undef OMPI_ENABLE_GREQUEST_EXTENSIONS
144-
145142
/* Whether we have float _Complex or not */
146143
#undef HAVE_FLOAT__COMPLEX
147144

@@ -409,12 +406,6 @@ typedef int (MPI_Grequest_query_function)(void *, MPI_Status *);
409406
typedef int (MPI_Grequest_free_function)(void *);
410407
typedef int (MPI_Grequest_cancel_function)(void *, int);
411408

412-
#if OMPI_ENABLE_GREQUEST_EXTENSIONS
413-
typedef int (MPIX_Grequest_poll_function)(void *, MPI_Status *);
414-
typedef int (MPIX_Grequest_wait_function)(int, void **, double, MPI_Status *);
415-
typedef int MPIX_Grequest_class;
416-
#endif /* OMPI_ENABLE_GREQUEST_EXTENSIONS */
417-
418409
#if !OMPI_OMIT_MPI1_COMPAT_DECLS
419410
/*
420411
* Removed typedefs. These will be deleted in a future Open MPI release.
@@ -1505,23 +1496,6 @@ OMPI_DECLSPEC int MPI_Grequest_start(MPI_Grequest_query_function *query_fn,
15051496
MPI_Grequest_free_function *free_fn,
15061497
MPI_Grequest_cancel_function *cancel_fn,
15071498
void *extra_state, MPI_Request *request);
1508-
#if OMPI_ENABLE_GREQUEST_EXTENSIONS
1509-
OMPI_DECLSPEC int MPIX_Grequest_start(MPI_Grequest_query_function *query_fn,
1510-
MPI_Grequest_free_function *free_fn,
1511-
MPI_Grequest_cancel_function *cancel_fn,
1512-
MPIX_Grequest_poll_function *poll_fn,
1513-
void *extra_state,
1514-
MPI_Request *request);
1515-
OMPI_DECLSPEC int MPIX_Grequest_class_create(MPI_Grequest_query_function *query_fn,
1516-
MPI_Grequest_free_function *free_fn,
1517-
MPI_Grequest_cancel_function *cancel_fn,
1518-
MPIX_Grequest_poll_function *poll_fn,
1519-
MPIX_Grequest_wait_function *wait_fn,
1520-
MPIX_Grequest_class *greq_class);
1521-
OMPI_DECLSPEC int MPIX_Grequest_class_allocate(MPIX_Grequest_class greq_class,
1522-
void *extra_state,
1523-
MPI_Request *request);
1524-
#endif /* OMPI_ENABLE_GREQUEST_EXTENSIONS */
15251499
OMPI_DECLSPEC MPI_Fint MPI_Group_c2f(MPI_Group group);
15261500
OMPI_DECLSPEC int MPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result);
15271501
OMPI_DECLSPEC int MPI_Group_difference(MPI_Group group1, MPI_Group group2,
@@ -2183,23 +2157,6 @@ OMPI_DECLSPEC int PMPI_Grequest_start(MPI_Grequest_query_function *query_fn,
21832157
MPI_Grequest_free_function *free_fn,
21842158
MPI_Grequest_cancel_function *cancel_fn,
21852159
void *extra_state, MPI_Request *request);
2186-
#if OMPI_ENABLE_GREQUEST_EXTENSIONS
2187-
OMPI_DECLSPEC int PMPIX_Grequest_start(MPI_Grequest_query_function *query_fn,
2188-
MPI_Grequest_free_function *free_fn,
2189-
MPI_Grequest_cancel_function *cancel_fn,
2190-
MPIX_Grequest_poll_function *poll_fn,
2191-
void *extra_state,
2192-
MPI_Request *request);
2193-
OMPI_DECLSPEC int PMPIX_Grequest_class_create(MPI_Grequest_query_function *query_fn,
2194-
MPI_Grequest_free_function *free_fn,
2195-
MPI_Grequest_cancel_function *cancel_fn,
2196-
MPIX_Grequest_poll_function *poll_fn,
2197-
MPIX_Grequest_wait_function *wait_fn,
2198-
MPIX_Grequest_class *greq_class);
2199-
OMPI_DECLSPEC int PMPIX_Grequest_class_allocate(MPIX_Grequest_class greq_class,
2200-
void *extra_state,
2201-
MPI_Request *request);
2202-
#endif /* OMPI_ENABLE_GREQUEST_EXTENSIONS */
22032160
OMPI_DECLSPEC MPI_Fint PMPI_Group_c2f(MPI_Group group);
22042161
OMPI_DECLSPEC int PMPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result);
22052162
OMPI_DECLSPEC int PMPI_Group_difference(MPI_Group group1, MPI_Group group2,

ompi/mca/io/romio321/configure.m4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ AC_DEFUN([MCA_ompi_io_romio321_CONFIG],[
7777
[AS_IF([test ! -z $build], [io_romio321_flags="$io_romio321_flags --build=$build"])
7878
AS_IF([test ! -z $host], [io_romio321_flags="$io_romio321_flags --host=$host"])
7979
AS_IF([test ! -z $target], [io_romio321_flags="$io_romio321_flags --target=$target"])])
80+
AS_IF([test "$enable_grequest_extensions" = "yes"],
81+
[io_romio321_flags="$io_romio321_flags --enable-grequest-extensions"])
8082
io_romio321_flags_define="$io_romio321_flags FROM_OMPI=yes CC='$CC' CFLAGS='$CFLAGS -D__EXTENSIONS__' CPPFLAGS='$CPPFLAGS' FFLAGS='$FFLAGS' LDFLAGS='$LDFLAGS' --$io_romio321_shared-shared --$io_romio321_static-static $io_romio321_flags $io_romio321_prefix_arg --disable-aio --disable-weak-symbols --enable-strict --disable-f77 --disable-f90"
8183
AC_DEFINE_UNQUOTED([MCA_io_romio321_COMPLETE_CONFIGURE_FLAGS], ["$io_romio321_flags_define"], [Complete set of command line arguments given to ROMIOs configure script])
8284

ompi/mca/io/romio321/romio/configure.ac

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,10 +1515,7 @@ if test $FROM_OMPI = yes ; then
15151515
[AC_HELP_STRING([--enable-grequest-extensions],
15161516
[Enable support for Grequest extensions (default: disabled)])])
15171517
AS_IF([test "x$enable_grequest_extensions" = "xyes"],
1518-
[DEFINE_HAVE_MPI_GREQUEST_EXTENSIONS="#define HAVE_MPI_GREQUEST_EXTENSIONS 1
1519-
1520-
extern void opal_progress(void);
1521-
#define MPIR_Ext_cs_yield_opal_progress"],
1518+
[DEFINE_HAVE_MPI_GREQUEST_EXTENSIONS="#include \"ompi_grequestx.h\""],
15221519
[DEFINE_HAVE_MPI_GREQUEST_EXTENSIONS="#undef HAVE_MPI_GREQUEST_EXTENSIONS"])
15231520
15241521
AC_DEFINE(HAVE_DECL_MPI_COMBINER_HINDEXED_BLOCK, 1, [Define if MPI library provides HINDEXED_BLOCK datatype])
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#define HAVE_MPI_GREQUEST_EXTENSIONS 1
2+
3+
extern void opal_progress(void);
4+
5+
typedef int (MPIX_Grequest_poll_function)(void *, MPI_Status *);
6+
typedef int (MPIX_Grequest_wait_function)(int, void **, double, MPI_Status *);
7+
typedef int MPIX_Grequest_class;
8+
9+
extern int ompi_grequestx_start(
10+
MPI_Grequest_query_function *gquery,
11+
MPI_Grequest_free_function *gfree,
12+
MPI_Grequest_cancel_function *gcancel,
13+
MPIX_Grequest_poll_function *gpoll,
14+
void* gstate,
15+
MPI_Request* request);
16+
17+
extern int ompi_grequestx_class_create(
18+
MPI_Grequest_query_function *gquery,
19+
MPI_Grequest_free_function *gfree,
20+
MPI_Grequest_cancel_function *gcancel,
21+
MPIX_Grequest_poll_function *gpoll,
22+
MPIX_Grequest_wait_function *gwait,
23+
MPIX_Grequest_class *greq_class);
24+
25+
extern int ompi_grequestx_class_allocate(
26+
MPIX_Grequest_class greq_class,
27+
void *extra_state,
28+
MPI_Request* request);
29+
30+
#define MPIR_Ext_cs_yield opal_progress
31+
#define PMPIX_Grequest_class_allocate(greq_class,extra_state,request) ompi_grequestx_class_allocate(greq_class,extra_state,request)
32+
#define PMPIX_Grequest_class_create(query_fn,free_fn,cancel_fn,poll_fn,wait_fn,greq_class) ompi_grequestx_class_create(query_fn,free_fn,cancel_fn,poll_fn,wait_fn,greq_class)
33+
#define PMPIX_Grequest_start(query_fn,free_fn,cancel_fn,poll_fn,extra_state,request) ompi_grequestx_start(query_fn,free_fn,cancel_fn,poll_fn,extra_state,request)
34+

ompi/mpi/c/Makefile.am

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -431,13 +431,6 @@ libmpi_c_mpi_la_SOURCES = \
431431
win_unlock_all.c \
432432
win_wait.c
433433

434-
if OMPI_ENABLE_GREQUEST_EXTENSIONS
435-
libmpi_c_mpi_la_SOURCES += \
436-
grequestx_class_allocate.c \
437-
grequestx_class_create.c \
438-
grequestx_start.c
439-
endif
440-
441434
if OMPI_ENABLE_MPI1_COMPAT
442435
libmpi_c_mpi_la_SOURCES += \
443436
address.c \

ompi/mpi/c/grequestx_class_allocate.c

Lines changed: 0 additions & 48 deletions
This file was deleted.

ompi/mpi/c/grequestx_class_create.c

Lines changed: 0 additions & 51 deletions
This file was deleted.

ompi/mpi/c/grequestx_start.c

Lines changed: 0 additions & 50 deletions
This file was deleted.

ompi/mpi/c/profile/Makefile.am

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -411,13 +411,6 @@ nodist_libmpi_c_pmpi_la_SOURCES = \
411411
pwin_unlock_all.c \
412412
pwin_wait.c
413413

414-
if OMPI_ENABLE_GREQUEST_EXTENSIONS
415-
nodist_libmpi_c_pmpi_la_SOURCES += \
416-
pgrequestx_class_allocate.c \
417-
pgrequestx_class_create.c \
418-
pgrequestx_start.c
419-
endif
420-
421414
if OMPI_ENABLE_MPI1_COMPAT
422415
nodist_libmpi_c_pmpi_la_SOURCES += \
423416
paddress.c \

ompi/request/grequest.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ typedef void (MPI_F_Grequest_cancel_function)(MPI_Aint *extra_state,
5050
/**
5151
* Fortran type for generalized request query function
5252
*/
53-
typedef void (MPIX_F_Grequest_poll_function)(MPI_Aint *extra_state,
54-
MPI_Fint *status,
55-
MPI_Fint *ierr);
53+
typedef int (ompi_grequestx_poll_function)(void *, MPI_Status *);
54+
55+
typedef void (ompi_f_grequestx_poll_function)(MPI_Aint *extra_state,
56+
MPI_Fint *status,
57+
MPI_Fint *ierr);
5658
#endif
5759

5860
/**
@@ -84,9 +86,9 @@ typedef union {
8486
* Union for poll function for use in ompi_grequestx_t
8587
*/
8688
typedef union {
87-
MPIX_Grequest_poll_function* c_poll;
88-
MPIX_F_Grequest_poll_function* f_poll;
89-
} MPIX_Grequest_poll_fct_t;
89+
ompi_grequestx_poll_function* c_poll;
90+
ompi_f_grequestx_poll_function* f_poll;
91+
} ompi_grequestx_poll_fct_t;
9092
#endif
9193

9294
/**
@@ -98,7 +100,7 @@ struct ompi_grequest_t {
98100
MPI_Grequest_free_fct_t greq_free;
99101
MPI_Grequest_cancel_fct_t greq_cancel;
100102
#if OMPI_ENABLE_GREQUEST_EXTENSIONS
101-
MPIX_Grequest_poll_fct_t greq_poll;
103+
ompi_grequestx_poll_fct_t greq_poll;
102104
#endif
103105
void *greq_state;
104106
bool greq_funcs_are_c;

0 commit comments

Comments
 (0)