1
1

io/romio321: make grequest extensions internal

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Этот коммит содержится в:
Gilles Gouaillardet 2018-06-29 16:35:28 +09:00
родитель 7aa5177280
Коммит 7363906e4e
12 изменённых файлов: 67 добавлений и 236 удалений

Просмотреть файл

@ -139,9 +139,6 @@
/* Whether in include MPI-1 compatibility */
#undef OMPI_ENABLE_MPI1_COMPAT
/* Whether we support Grequest extensions */
#undef OMPI_ENABLE_GREQUEST_EXTENSIONS
/* Whether we have float _Complex or not */
#undef HAVE_FLOAT__COMPLEX
@ -409,12 +406,6 @@ typedef int (MPI_Grequest_query_function)(void *, MPI_Status *);
typedef int (MPI_Grequest_free_function)(void *);
typedef int (MPI_Grequest_cancel_function)(void *, int);
#if OMPI_ENABLE_GREQUEST_EXTENSIONS
typedef int (MPIX_Grequest_poll_function)(void *, MPI_Status *);
typedef int (MPIX_Grequest_wait_function)(int, void **, double, MPI_Status *);
typedef int MPIX_Grequest_class;
#endif /* OMPI_ENABLE_GREQUEST_EXTENSIONS */
#if !OMPI_OMIT_MPI1_COMPAT_DECLS
/*
* 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,
MPI_Grequest_free_function *free_fn,
MPI_Grequest_cancel_function *cancel_fn,
void *extra_state, MPI_Request *request);
#if OMPI_ENABLE_GREQUEST_EXTENSIONS
OMPI_DECLSPEC int MPIX_Grequest_start(MPI_Grequest_query_function *query_fn,
MPI_Grequest_free_function *free_fn,
MPI_Grequest_cancel_function *cancel_fn,
MPIX_Grequest_poll_function *poll_fn,
void *extra_state,
MPI_Request *request);
OMPI_DECLSPEC int MPIX_Grequest_class_create(MPI_Grequest_query_function *query_fn,
MPI_Grequest_free_function *free_fn,
MPI_Grequest_cancel_function *cancel_fn,
MPIX_Grequest_poll_function *poll_fn,
MPIX_Grequest_wait_function *wait_fn,
MPIX_Grequest_class *greq_class);
OMPI_DECLSPEC int MPIX_Grequest_class_allocate(MPIX_Grequest_class greq_class,
void *extra_state,
MPI_Request *request);
#endif /* OMPI_ENABLE_GREQUEST_EXTENSIONS */
OMPI_DECLSPEC MPI_Fint MPI_Group_c2f(MPI_Group group);
OMPI_DECLSPEC int MPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result);
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,
MPI_Grequest_free_function *free_fn,
MPI_Grequest_cancel_function *cancel_fn,
void *extra_state, MPI_Request *request);
#if OMPI_ENABLE_GREQUEST_EXTENSIONS
OMPI_DECLSPEC int PMPIX_Grequest_start(MPI_Grequest_query_function *query_fn,
MPI_Grequest_free_function *free_fn,
MPI_Grequest_cancel_function *cancel_fn,
MPIX_Grequest_poll_function *poll_fn,
void *extra_state,
MPI_Request *request);
OMPI_DECLSPEC int PMPIX_Grequest_class_create(MPI_Grequest_query_function *query_fn,
MPI_Grequest_free_function *free_fn,
MPI_Grequest_cancel_function *cancel_fn,
MPIX_Grequest_poll_function *poll_fn,
MPIX_Grequest_wait_function *wait_fn,
MPIX_Grequest_class *greq_class);
OMPI_DECLSPEC int PMPIX_Grequest_class_allocate(MPIX_Grequest_class greq_class,
void *extra_state,
MPI_Request *request);
#endif /* OMPI_ENABLE_GREQUEST_EXTENSIONS */
OMPI_DECLSPEC MPI_Fint PMPI_Group_c2f(MPI_Group group);
OMPI_DECLSPEC int PMPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result);
OMPI_DECLSPEC int PMPI_Group_difference(MPI_Group group1, MPI_Group group2,

Просмотреть файл

@ -77,6 +77,8 @@ AC_DEFUN([MCA_ompi_io_romio321_CONFIG],[
[AS_IF([test ! -z $build], [io_romio321_flags="$io_romio321_flags --build=$build"])
AS_IF([test ! -z $host], [io_romio321_flags="$io_romio321_flags --host=$host"])
AS_IF([test ! -z $target], [io_romio321_flags="$io_romio321_flags --target=$target"])])
AS_IF([test "$enable_grequest_extensions" = "yes"],
[io_romio321_flags="$io_romio321_flags --enable-grequest-extensions"])
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"
AC_DEFINE_UNQUOTED([MCA_io_romio321_COMPLETE_CONFIGURE_FLAGS], ["$io_romio321_flags_define"], [Complete set of command line arguments given to ROMIOs configure script])

Просмотреть файл

@ -1515,10 +1515,7 @@ if test $FROM_OMPI = yes ; then
[AC_HELP_STRING([--enable-grequest-extensions],
[Enable support for Grequest extensions (default: disabled)])])
AS_IF([test "x$enable_grequest_extensions" = "xyes"],
[DEFINE_HAVE_MPI_GREQUEST_EXTENSIONS="#define HAVE_MPI_GREQUEST_EXTENSIONS 1
extern void opal_progress(void);
#define MPIR_Ext_cs_yield_opal_progress"],
[DEFINE_HAVE_MPI_GREQUEST_EXTENSIONS="#include \"ompi_grequestx.h\""],
[DEFINE_HAVE_MPI_GREQUEST_EXTENSIONS="#undef HAVE_MPI_GREQUEST_EXTENSIONS"])
AC_DEFINE(HAVE_DECL_MPI_COMBINER_HINDEXED_BLOCK, 1, [Define if MPI library provides HINDEXED_BLOCK datatype])

Просмотреть файл

@ -0,0 +1,34 @@
#define HAVE_MPI_GREQUEST_EXTENSIONS 1
extern void opal_progress(void);
typedef int (MPIX_Grequest_poll_function)(void *, MPI_Status *);
typedef int (MPIX_Grequest_wait_function)(int, void **, double, MPI_Status *);
typedef int MPIX_Grequest_class;
extern int ompi_grequestx_start(
MPI_Grequest_query_function *gquery,
MPI_Grequest_free_function *gfree,
MPI_Grequest_cancel_function *gcancel,
MPIX_Grequest_poll_function *gpoll,
void* gstate,
MPI_Request* request);
extern int ompi_grequestx_class_create(
MPI_Grequest_query_function *gquery,
MPI_Grequest_free_function *gfree,
MPI_Grequest_cancel_function *gcancel,
MPIX_Grequest_poll_function *gpoll,
MPIX_Grequest_wait_function *gwait,
MPIX_Grequest_class *greq_class);
extern int ompi_grequestx_class_allocate(
MPIX_Grequest_class greq_class,
void *extra_state,
MPI_Request* request);
#define MPIR_Ext_cs_yield opal_progress
#define PMPIX_Grequest_class_allocate(greq_class,extra_state,request) ompi_grequestx_class_allocate(greq_class,extra_state,request)
#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)
#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)

Просмотреть файл

@ -431,13 +431,6 @@ libmpi_c_mpi_la_SOURCES = \
win_unlock_all.c \
win_wait.c
if OMPI_ENABLE_GREQUEST_EXTENSIONS
libmpi_c_mpi_la_SOURCES += \
grequestx_class_allocate.c \
grequestx_class_create.c \
grequestx_start.c
endif
if OMPI_ENABLE_MPI1_COMPAT
libmpi_c_mpi_la_SOURCES += \
address.c \

Просмотреть файл

@ -1,48 +0,0 @@
/*
* Copyright (c) 2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include <stdio.h>
#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
#include "ompi/communicator/communicator.h"
#include "ompi/errhandler/errhandler.h"
#include "ompi/request/grequestx.h"
#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPIX_Grequest_class_allocate = PMPIX_Grequest_class_allocate
#endif
#define MPIX_Grequest_class_allocate PMPIX_Grequest_class_allocate
#endif
static const char FUNC_NAME[] = "MPIX_Grequest_class_allocate";
int MPIX_Grequest_class_allocate(MPIX_Grequest_class greq_class,
void *extra_state,
MPI_Request *request)
{
int rc;
if (MPI_PARAM_CHECK) {
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (NULL == request) {
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_REQUEST,
FUNC_NAME);
}
}
OPAL_CR_ENTER_LIBRARY();
rc = ompi_grequestx_class_allocate(greq_class, extra_state, request);
OMPI_ERRHANDLER_RETURN(rc, MPI_COMM_WORLD, rc, FUNC_NAME);
}

Просмотреть файл

@ -1,51 +0,0 @@
/*
* Copyright (c) 2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include <stdio.h>
#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
#include "ompi/communicator/communicator.h"
#include "ompi/errhandler/errhandler.h"
#include "ompi/request/grequestx.h"
#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPIX_Grequest_class_create = PMPIX_Grequest_class_create
#endif
#define MPIX_Grequest_class_create PMPIX_Grequest_class_create
#endif
static const char FUNC_NAME[] = "MPIX_Grequest_class_create";
int MPIX_Grequest_class_create(MPI_Grequest_query_function *query_fn,
MPI_Grequest_free_function *free_fn,
MPI_Grequest_cancel_function *cancel_fn,
MPIX_Grequest_poll_function *poll_fn,
MPIX_Grequest_wait_function *wait_fn,
MPIX_Grequest_class *greq_class)
{
int rc;
if (MPI_PARAM_CHECK) {
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (NULL == greq_class) {
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_REQUEST,
FUNC_NAME);
}
}
OPAL_CR_ENTER_LIBRARY();
rc = ompi_grequestx_class_create(query_fn,free_fn,cancel_fn,poll_fn,wait_fn,greq_class);
OMPI_ERRHANDLER_RETURN(rc, MPI_COMM_WORLD, rc, FUNC_NAME);
}

Просмотреть файл

@ -1,50 +0,0 @@
/*
* Copyright (c) 2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include <stdio.h>
#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
#include "ompi/communicator/communicator.h"
#include "ompi/errhandler/errhandler.h"
#include "ompi/request/grequestx.h"
#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPIX_Grequest_start = PMPIX_Grequest_start
#endif
#define MPIX_Grequest_start PMPIX_Grequest_start
#endif
static const char FUNC_NAME[] = "MPIX_Grequest_start";
int MPIX_Grequest_start(MPI_Grequest_query_function *query_fn,
MPI_Grequest_free_function *free_fn,
MPI_Grequest_cancel_function *cancel_fn,
MPIX_Grequest_poll_function *poll_fn,
void *extra_state, MPI_Request *request)
{
int rc;
if (MPI_PARAM_CHECK) {
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (NULL == request) {
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_REQUEST,
FUNC_NAME);
}
}
OPAL_CR_ENTER_LIBRARY();
rc = ompi_grequestx_start(query_fn,free_fn,cancel_fn,poll_fn,extra_state,request);
OMPI_ERRHANDLER_RETURN(rc, MPI_COMM_WORLD, rc, FUNC_NAME);
}

Просмотреть файл

@ -411,13 +411,6 @@ nodist_libmpi_c_pmpi_la_SOURCES = \
pwin_unlock_all.c \
pwin_wait.c
if OMPI_ENABLE_GREQUEST_EXTENSIONS
nodist_libmpi_c_pmpi_la_SOURCES += \
pgrequestx_class_allocate.c \
pgrequestx_class_create.c \
pgrequestx_start.c
endif
if OMPI_ENABLE_MPI1_COMPAT
nodist_libmpi_c_pmpi_la_SOURCES += \
paddress.c \

Просмотреть файл

@ -50,9 +50,11 @@ typedef void (MPI_F_Grequest_cancel_function)(MPI_Aint *extra_state,
/**
* Fortran type for generalized request query function
*/
typedef void (MPIX_F_Grequest_poll_function)(MPI_Aint *extra_state,
MPI_Fint *status,
MPI_Fint *ierr);
typedef int (ompi_grequestx_poll_function)(void *, MPI_Status *);
typedef void (ompi_f_grequestx_poll_function)(MPI_Aint *extra_state,
MPI_Fint *status,
MPI_Fint *ierr);
#endif
/**
@ -84,9 +86,9 @@ typedef union {
* Union for poll function for use in ompi_grequestx_t
*/
typedef union {
MPIX_Grequest_poll_function* c_poll;
MPIX_F_Grequest_poll_function* f_poll;
} MPIX_Grequest_poll_fct_t;
ompi_grequestx_poll_function* c_poll;
ompi_f_grequestx_poll_function* f_poll;
} ompi_grequestx_poll_fct_t;
#endif
/**
@ -98,7 +100,7 @@ struct ompi_grequest_t {
MPI_Grequest_free_fct_t greq_free;
MPI_Grequest_cancel_fct_t greq_cancel;
#if OMPI_ENABLE_GREQUEST_EXTENSIONS
MPIX_Grequest_poll_fct_t greq_poll;
ompi_grequestx_poll_fct_t greq_poll;
#endif
void *greq_state;
bool greq_funcs_are_c;

Просмотреть файл

@ -60,7 +60,7 @@ int ompi_grequestx_start(
MPI_Grequest_query_function *gquery_fn,
MPI_Grequest_free_function *gfree_fn,
MPI_Grequest_cancel_function *gcancel_fn,
MPIX_Grequest_poll_function *gpoll_fn,
ompi_grequestx_poll_function *gpoll_fn,
void* extra_state,
ompi_request_t** request)
{
@ -90,20 +90,20 @@ int ompi_grequestx_start(
}
struct ompi_grequestx_class {
struct grequestx_class {
opal_object_t super;
MPI_Grequest_query_function *gquery_fn;
MPI_Grequest_free_function *gfree_fn;
MPI_Grequest_cancel_function *gcancel_fn;
MPIX_Grequest_poll_function *gpoll_fn;
MPIX_Grequest_wait_function *gwait_fn;
ompi_grequestx_poll_function *gpoll_fn;
ompi_grequestx_wait_function *gwait_fn;
} ;
typedef struct ompi_grequestx_class ompi_grequestx_class;
typedef struct grequestx_class grequestx_class;
static int next_class = 0;
static OBJ_CLASS_INSTANCE(ompi_grequestx_class, opal_object_t, NULL, NULL);
static OBJ_CLASS_INSTANCE(grequestx_class, opal_object_t, NULL, NULL);
static opal_pointer_array_t classes;
@ -111,11 +111,11 @@ int ompi_grequestx_class_create(
MPI_Grequest_query_function *gquery_fn,
MPI_Grequest_free_function *gfree_fn,
MPI_Grequest_cancel_function *gcancel_fn,
MPIX_Grequest_poll_function *gpoll_fn,
MPIX_Grequest_wait_function *gwait_fn,
MPIX_Grequest_class *greq_class)
ompi_grequestx_poll_function *gpoll_fn,
ompi_grequestx_wait_function *gwait_fn,
ompi_grequestx_class *greq_class)
{
ompi_grequestx_class * class = OBJ_NEW(ompi_grequestx_class);
grequestx_class * class = OBJ_NEW(grequestx_class);
class->gquery_fn = gquery_fn;
class->gfree_fn = gfree_fn;
class->gcancel_fn = gcancel_fn;
@ -132,11 +132,11 @@ int ompi_grequestx_class_create(
}
int ompi_grequestx_class_allocate(
MPIX_Grequest_class greq_class,
ompi_grequestx_class greq_class,
void *extra_state,
ompi_request_t **request)
{
ompi_grequestx_class *class = opal_pointer_array_get_item(&classes, greq_class);
grequestx_class *class = opal_pointer_array_get_item(&classes, greq_class);
ompi_grequestx_start(class->gquery_fn, class->gfree_fn, class->gcancel_fn, class->gpoll_fn, extra_state, request);
return OMPI_SUCCESS;

Просмотреть файл

@ -25,14 +25,16 @@
BEGIN_C_DECLS
typedef int (ompi_grequestx_wait_function)(int, void **, double, MPI_Status *);
typedef int ompi_grequestx_class;
/**
* Start a generalized request (back end for MPIX_GREQUEST_START)
* Start an extended generalized request
*/
OMPI_DECLSPEC int ompi_grequestx_start(
MPI_Grequest_query_function *gquery,
MPI_Grequest_free_function *gfree,
MPI_Grequest_cancel_function *gcancel,
MPIX_Grequest_poll_function *gpoll,
ompi_grequestx_poll_function *gpoll,
void* gstate,
ompi_request_t** request);
@ -40,14 +42,14 @@ OMPI_DECLSPEC int ompi_grequestx_class_create(
MPI_Grequest_query_function *gquery,
MPI_Grequest_free_function *gfree,
MPI_Grequest_cancel_function *gcancel,
MPIX_Grequest_poll_function *gpoll,
MPIX_Grequest_wait_function *gwait,
MPIX_Grequest_class *greq_class);
ompi_grequestx_poll_function *gpoll,
ompi_grequestx_wait_function *gwait,
ompi_grequestx_class *greq_class);
OMPI_DECLSPEC int ompi_grequestx_class_allocate(
MPIX_Grequest_class greq_class,
ompi_grequestx_class greq_class,
void *extra_state,
ompi_request_t **request);
ompi_request_t** request);
END_C_DECLS