diff --git a/examples/.codingcheck b/examples/.codingcheck deleted file mode 100644 index 2725c2b0aaa..00000000000 --- a/examples/.codingcheck +++ /dev/null @@ -1,21 +0,0 @@ -# -# We allow these routines for the example programs -%exampleRoutines = ( - 'printf' => sys, 'fprintf' => sys , 'sprintf' => sys, 'vprintf' => sys, - 'strcpy' => sys, 'strncpy' => sys, 'strcat' => sys, - 'malloc' => sys, 'free' => sys, 'calloc' => sys, 'strdup' => sys, - 'assert' => sys, - ); -&PushAllowFuncNames( "exampleRoutines", "tree", "add" ); - -# Allow #ifdef DEBUG in the examples -%exampleDefines = ( 'DEBUG' => 1 ); -if (defined(&PushDefinesNames)) { - &PushDefinesNames( "exampleDefines", "tree", "add" ); -} - -# -# Tell the preamble code not to complain about missing mode comments -&PreambleCheckMode( 0 ); - -1; diff --git a/maint/local_python/binding_c.py b/maint/local_python/binding_c.py index 4035135c227..9c20e31df60 100644 --- a/maint/local_python/binding_c.py +++ b/maint/local_python/binding_c.py @@ -237,8 +237,8 @@ def dump_mpir_io_impl_h(f): print("#ifndef HAVE_ROMIO", file=Out) print("#define MPIO_Err_return_file(fh, errorcode) MPIR_Err_return_comm((void *)0, __func__, errorcode)", file=Out) print("#else", file=Out) - print("MPI_Fint MPIR_File_c2f_impl(MPI_File fh);", file=Out) - print("MPI_File MPIR_File_f2c_impl(MPI_Fint fh);", file=Out) + print("int MPIR_File_toint_impl(MPI_File fh);", file=Out) + print("MPI_File MPIR_File_fromint_impl(int fh);", file=Out) print("int MPIO_Err_return_file(MPI_File fh, int errorcode);", file=Out) print("#endif", file=Out) print("", file=Out) diff --git a/src/binding/c/io_api.txt b/src/binding/c/io_api.txt index d0b185bea9c..6525b51a8a0 100644 --- a/src/binding/c/io_api.txt +++ b/src/binding/c/io_api.txt @@ -7,7 +7,7 @@ MPI_File_c2f: #ifndef HAVE_ROMIO return 0; #else - return MPIR_File_c2f_impl(file); + return MPIR_File_toint_impl(file); #endif } @@ -18,7 +18,7 @@ MPI_File_f2c: #ifndef HAVE_ROMIO return 0; #else - return MPIR_File_f2c_impl(file); + return MPIR_File_fromint_impl(file); #endif } @@ -31,7 +31,7 @@ MPI_File_toint: #ifndef HAVE_ROMIO return 0; #else - return (int) MPIR_File_c2f_impl(file); + return MPIR_File_toint_impl(file); #endif } @@ -44,7 +44,7 @@ MPI_File_fromint: #ifndef HAVE_ROMIO return 0; #else - return MPIR_File_f2c_impl(file); + return MPIR_File_fromint_impl(file); #endif } diff --git a/src/mpi/romio/.codingcheck b/src/mpi/romio/.codingcheck deleted file mode 100644 index bc77906acb3..00000000000 --- a/src/mpi/romio/.codingcheck +++ /dev/null @@ -1,54 +0,0 @@ -# Here are names that at least at one point were used within ROMIO. -# We should look at these and decide which we wish to allow and which -# should be replaced with something more ROMIO-specific. -%romioDefines = ( 'ROMIO_[A-Za-z0-9_]+' => romio, - 'PROFILE' => romio, - 'PRINT_ERR_MSG' => romio, - 'HPUX' => romio, - 'SPPUX'=> romio, - 'SX4'=> romio, - 'AIO_SUN'=> romio, - 'AIO_HANDLE_IN_AIOCB'=> romio, - 'NO_FD_IN_AIOCB'=> romio, - 'NO_AIO'=> romio, - 'AIO_PRIORITY_DEFAULT'=> romio, - 'AIO_SIGNOTIFY_NONE'=> romio, - 'MPISGI'=> romio, - 'CRAY'=> romio, - 'PARAGON'=> romio, - 'FREEBSD'=> romio, - 'LINUX'=> romio, - 'tflops'=> romio, - 'NFS'=> romio, - 'XFS'=> romio, - 'CB_CONFIG_LIST_DEBUG'=> romio, - 'SFS'=> romio, - 'HFS'=> romio, - 'UFS'=> romio, - 'PVFS_.+' => romio, - 'MPI_hpux'=> romio, - 'FORTRANCAPS'=> romio, - 'NEEDS_ADIOCB_T'=> romio, - 'AGG_DEBUG'=> romio, - 'SOLARIS'=> romio, - 'IRIX'=> romio, - 'AIX'=> romio, - 'DEC'=> romio, - 'NEEDS_MPI_TEST'=> romio, - 'PFS'=> romio, - 'PIOFS'=> romio, - 'MPICH'=> romio, - 'MPICH' => romio, - 'MPI_OFFSET_IS_INT'=> romio, - 'MPI_COMBINER_NAMED'=> romio, - '_UNICOS'=> romio, - 'MPIHP'=> romio, - ); - -# Only invoke this function if the function is defined (in case the -# user removed the cpp defines check with -rmchecks=cppdefines) -if (defined(&PushDefinesNames)) { - &PushDefinesNames( "romioDefines", "tree", "add" ); -} - -1; diff --git a/src/mpi/romio/adio/ad_xfs/ad_xfs.h b/src/mpi/romio/adio/ad_xfs/ad_xfs.h index 0d0278cd61a..d1d3b642d8c 100644 --- a/src/mpi/romio/adio/ad_xfs/ad_xfs.h +++ b/src/mpi/romio/adio/ad_xfs/ad_xfs.h @@ -11,14 +11,6 @@ #include #include -#if defined(MPISGI) -#include "xfs/xfs_fs.h" -#ifndef __USE_LARGEFILE64 -#define __USE_LARGEFILE64 -#endif -typedef struct aiocb64 aiocb64_t; -#endif - void ADIOI_XFS_Open(ADIO_File fd, int *error_code); void ADIOI_XFS_Close(ADIO_File fd, int *error_code); void ADIOI_XFS_ReadContig(ADIO_File fd, void *buf, MPI_Aint count, diff --git a/src/mpi/romio/adio/ad_xfs/ad_xfs_fcntl.c b/src/mpi/romio/adio/ad_xfs/ad_xfs_fcntl.c index 91146a11d33..854d92c627a 100644 --- a/src/mpi/romio/adio/ad_xfs/ad_xfs_fcntl.c +++ b/src/mpi/romio/adio/ad_xfs/ad_xfs_fcntl.c @@ -14,11 +14,7 @@ void ADIOI_XFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t * fcntl_struct, int *error_code) { int i, err; -#if defined(LINUX) && defined(MPISGI) - struct xfs_flock64 fl; -#else struct flock64 fl; -#endif static char myname[] = "ADIOI_XFS_FCNTL"; switch (flag) { @@ -39,11 +35,7 @@ void ADIOI_XFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t * fcntl_struct, int *e fl.l_whence = SEEK_SET; fl.l_len = fcntl_struct->diskspace; -#if defined(LINUX) && defined(MPISGI) - err = ioctl(fd->fd_sys, XFS_IOC_RESVSP64, &fl); -#else err = fcntl(fd->fd_sys, F_RESVSP64, &fl); -#endif if (err) i = 1; diff --git a/src/mpi/romio/adio/ad_xfs/ad_xfs_open.c b/src/mpi/romio/adio/ad_xfs/ad_xfs_open.c index 7862269e14d..0b6df72c536 100644 --- a/src/mpi/romio/adio/ad_xfs/ad_xfs_open.c +++ b/src/mpi/romio/adio/ad_xfs/ad_xfs_open.c @@ -51,11 +51,7 @@ void ADIOI_XFS_Open(ADIO_File fd, int *error_code) fd->fd_direct = open(fd->filename, amode_direct, perm); if (fd->fd_direct != -1) { -#if defined(MPISGI) - ioctl(fd->fd_direct, XFS_IOC_DIOINFO, &st); -#else fcntl(fd->fd_direct, F_DIOINFO, &st); -#endif fd->d_mem = st.d_mem; fd->d_miniosz = st.d_miniosz; diff --git a/src/mpi/romio/adio/common/ad_end.c b/src/mpi/romio/adio/common/ad_end.c index 082aedcc434..c4b76cda5af 100644 --- a/src/mpi/romio/adio/common/ad_end.c +++ b/src/mpi/romio/adio/common/ad_end.c @@ -19,10 +19,6 @@ void ADIO_End(int *error_code) /* free file and info tables used for Fortran interface */ if (ADIOI_Ftable) ADIOI_Free(ADIOI_Ftable); -#ifndef HAVE_MPI_INFO - if (MPIR_Infotable) - ADIOI_Free(MPIR_Infotable); -#endif /* free the memory allocated for a new data representation, if any */ diff --git a/src/mpi/romio/adio/common/ad_init.c b/src/mpi/romio/adio/common/ad_init.c index 564f2f5b344..5a36a1b4fb9 100644 --- a/src/mpi/romio/adio/common/ad_init.c +++ b/src/mpi/romio/adio/common/ad_init.c @@ -14,10 +14,6 @@ ADIO_File *ADIOI_Ftable = NULL; int ADIOI_Ftable_ptr = 0, ADIOI_Ftable_max = 0; ADIO_Request *ADIOI_Reqtable = NULL; int ADIOI_Reqtable_ptr = 0, ADIOI_Reqtable_max = 0; -#ifndef HAVE_MPI_INFO -MPI_Info *MPIR_Infotable = NULL; -int MPIR_Infotable_ptr = 0, MPIR_Infotable_max = 0; -#endif MPI_Info ADIOI_syshints = MPI_INFO_NULL; diff --git a/src/mpi/romio/adio/common/iscontig.c b/src/mpi/romio/adio/common/iscontig.c index eed7b41ef12..d01dcc33d49 100644 --- a/src/mpi/romio/adio/common/iscontig.c +++ b/src/mpi/romio/adio/common/iscontig.c @@ -23,32 +23,6 @@ void ADIOI_Datatype_iscontig(MPI_Datatype datatype, int *flag) } } -#elif (defined(MPIHP) && defined(HAVE_MPI_INFO)) -/* i.e. HPMPI 1.4 only */ - -int hpmp_dtiscontig(MPI_Datatype datatype); - -void ADIOI_Datatype_iscontig(MPI_Datatype datatype, int *flag) -{ - *flag = hpmp_dtiscontig(datatype); -} - -#elif (defined(MPISGI) && !defined(NO_MPI_SGI_type_is_contig)) - -int MPI_SGI_type_is_contig(MPI_Datatype datatype); - -void ADIOI_Datatype_iscontig(MPI_Datatype datatype, int *flag) -{ - MPI_Aint displacement, extent; - MPI_Type_get_extent(datatype, &distplacement, &extent); - - /* SGI's MPI_SGI_type_is_contig() returns true for indexed - * datatypes with holes at the beginning, which causes - * problems with ROMIO's use of this function. - */ - *flag = MPI_SGI_type_is_contig(datatype) && (displacement == 0); -} - #elif defined(OMPI_BUILDING) && OMPI_BUILDING /* void ADIOI_Datatype_iscontig(MPI_Datatype datatype, int *flag) is defined diff --git a/src/mpi/romio/adio/include/adio.h b/src/mpi/romio/adio/include/adio.h index 361dad7c05f..c011372f077 100644 --- a/src/mpi/romio/adio/include/adio.h +++ b/src/mpi/romio/adio/include/adio.h @@ -96,67 +96,10 @@ #endif typedef MPI_Offset ADIO_Offset; -#ifdef MPI_OFFSET_IS_INT -#define ADIO_OFFSET MPI_INT -#elif defined(HAVE_LONG_LONG_64) -#ifdef HAVE_MPI_LONG_LONG_INT -#define ADIO_OFFSET MPI_LONG_LONG_INT -#else -#define ADIO_OFFSET MPI_DOUBLE -#endif -#elif defined(HAVE_INT64) -#define ADIO_OFFSET MPI_DOUBLE -#else -#define ADIO_OFFSET MPI_LONG -#endif +#define ADIO_OFFSET MPI_OFFSET #define ADIO_Status MPI_Status -#ifndef MPIO_INCLUDE -#ifdef NEEDS_MPI_FINT -typedef int MPI_Fint; -#endif -#endif - -#if (!defined(HAVE_MPI_INFO) && !defined(MPIO_INCLUDE)) -typedef struct MPIR_Info *MPI_Info; -#define MPI_INFO_NULL 0 -#define MPI_MAX_INFO_VAL 1024 - -int MPI_Info_create(MPI_Info * info); -int MPI_Info_set(MPI_Info info, char *key, char *value); -int MPI_Info_delete(MPI_Info info, char *key); -int MPI_Info_get(MPI_Info info, char *key, int valuelen, char *value, int *flag); -int MPI_Info_get_valuelen(MPI_Info info, char *key, int *valuelen, int *flag); -int MPI_Info_get_nkeys(MPI_Info info, int *nkeys); -int MPI_Info_get_nthkey(MPI_Info info, int n, char *key); -int MPI_Info_dup(MPI_Info info, MPI_Info * newinfo); -int MPI_Info_free(MPI_Info * info); - -#ifdef MPI_Info_f2c -#undef MPI_Info_f2c -#endif -#ifdef MPI_Info_c2f -#undef MPI_Info_c2f -#endif -/* above needed for some versions of mpi.h in MPICH!! */ -MPI_Fint MPI_Info_c2f(MPI_Info info); -MPI_Info MPI_Info_f2c(MPI_Fint info); - -int PMPI_Info_create(MPI_Info * info); -int PMPI_Info_set(MPI_Info info, char *key, char *value); -int PMPI_Info_delete(MPI_Info info, char *key); -int PMPI_Info_get(MPI_Info info, char *key, int valuelen, char *value, int *flag); -int PMPI_Info_get_valuelen(MPI_Info info, char *key, int *valuelen, int *flag); -int PMPI_Info_get_nkeys(MPI_Info info, int *nkeys); -int PMPI_Info_get_nthkey(MPI_Info info, int n, char *key); -int PMPI_Info_dup(MPI_Info info, MPI_Info * newinfo); -int PMPI_Info_free(MPI_Info * info); - -MPI_Fint PMPI_Info_c2f(MPI_Info info); -MPI_Info PMPI_Info_f2c(MPI_Fint info); - -#endif /* style: allow:strdup:1 sig:0 */ @@ -453,8 +396,8 @@ int ADIO_Type_create_darray(int size, int rank, int ndims, MPI_File MPIO_File_create(int size); ADIO_File MPIO_File_resolve(MPI_File mpi_fh); void MPIO_File_free(MPI_File * mpi_fh); -MPI_File MPIO_File_f2c(MPI_Fint fh); -MPI_Fint MPIO_File_c2f(MPI_File fh); +MPI_File MPIO_File_fromint(int fh); +int MPIO_File_toint(MPI_File fh); int MPIO_Err_create_code(int lastcode, int fatal, const char fcname[], int line, int error_class, const char generic_msg[], const char specific_msg[], ...); diff --git a/src/mpi/romio/adio/include/adio_extern.h b/src/mpi/romio/adio/include/adio_extern.h index a1a9c7d50c3..325d53d426a 100644 --- a/src/mpi/romio/adio/include/adio_extern.h +++ b/src/mpi/romio/adio/include/adio_extern.h @@ -13,10 +13,6 @@ extern ADIO_File *ADIOI_Ftable; extern int ADIOI_Ftable_ptr, ADIOI_Ftable_max; extern ADIO_Request *ADIOI_Reqtable; extern int ADIOI_Reqtable_ptr, ADIOI_Reqtable_max; -#ifndef HAVE_MPI_INFO -extern MPI_Info *MPIR_Infotable; -extern int MPIR_Infotable_ptr, MPIR_Infotable_max; -#endif #if defined(ROMIO_XFS) || defined(ROMIO_LUSTRE) extern int ADIOI_Direct_read, ADIOI_Direct_write; #endif diff --git a/src/mpi/romio/adio/include/mpipr.h b/src/mpi/romio/adio/include/mpipr.h index 0c1ab1a90f0..2aa4dd0bfc5 100644 --- a/src/mpi/romio/adio/include/mpipr.h +++ b/src/mpi/romio/adio/include/mpipr.h @@ -478,7 +478,6 @@ #undef MPI_Status_set_elements_x #define MPI_Status_set_elements_x PMPI_Status_set_elements_x -#ifndef HAVE_MPI_INFO_SRC /* everywhere except in info source directory */ #undef MPI_Info_create #define MPI_Info_create PMPI_Info_create #undef MPI_Info_set @@ -497,12 +496,6 @@ #define MPI_Info_dup PMPI_Info_dup #undef MPI_Info_free #define MPI_Info_free PMPI_Info_free -/* #undef MPI_Info_c2f -#define MPI_Info_c2f PMPI_Info_c2f -#undef MPI_Info_f2c -#define MPI_Info_f2c PMPI_Info_f2c -*/ -#endif #undef MPI_Grequest_start #define MPI_Grequest_start PMPI_Grequest_start #undef MPI_Grequest_complete @@ -515,12 +508,6 @@ #undef MPIX_Grequest_class_allocate #define MPIX_Grequest_class_allocate PMPIX_Grequest_class_allocate -#ifdef MPIO_FORTRAN_SRC /* only in MPI-IO Fortran source directory */ -#undef MPI_File_c2f -#define MPI_File_c2f PMPI_File_c2f -#undef MPI_File_f2c -#define MPI_File_f2c PMPI_File_f2c -#endif #undef MPI_Type_get_attr #define MPI_Type_get_attr PMPI_Type_get_attr diff --git a/src/mpi/romio/configure.ac b/src/mpi/romio/configure.ac index ebfe43f79c0..cdf838f6573 100644 --- a/src/mpi/romio/configure.ac +++ b/src/mpi/romio/configure.ac @@ -117,9 +117,6 @@ PAC_CONFIG_MPL CFLAGS=${CFLAGS:-""} LL="lld" AR_LOCAL="" -DEFINE_HAVE_MPI_GREQUEST="#undef HAVE_MPI_GREQUEST" -HAVE_MPI_INFO="" -BUILD_MPI_INFO="" MPI_FINFO1="" MPI_FINFO2="" MPI_FINFO3="" @@ -433,85 +430,11 @@ if test "$pac_cv_int_hold_pointer" != yes ; then AC_DEFINE(INT_LT_POINTER,1,[Define if int smaller than pointer]) fi -# LL is the printf-style format name for output of a MPI_Offset. -# We have to match this to the type that we use for MPI_Offset. +# MPI_Offset is always long long in MPICH and Open MPI AC_CHECK_SIZEOF(long long) -if test "$ac_cv_sizeof_long_long" != 0 ; then - if test "$ac_cv_sizeof_long_long" = "8" ; then - AC_DEFINE(HAVE_LONG_LONG_64,1,[Define if long long is 64 bits]) - MPI_OFFSET_TYPE="long long" - DEFINE_MPI_OFFSET="typedef long long MPI_Offset;" - LL="lld" - elif test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_int" ; then - MPI_OFFSET_TYPE="int" - DEFINE_MPI_OFFSET="typedef int MPI_Offset;" - AC_DEFINE(MPI_OFFSET_IS_INT,1,[Define if MPI_Offset is int]) - LL="d" - else - AC_MSG_NOTICE([defining MPI_Offset as long in C and integer in Fortran]) - MPI_OFFSET_TYPE="long" - DEFINE_MPI_OFFSET="typedef long MPI_Offset;" - LL="ld" - fi -else - AC_MSG_NOTICE([defining MPI_Offset as long in C and integer in Fortran]) - MPI_OFFSET_TYPE="long" - DEFINE_MPI_OFFSET="typedef long MPI_Offset;" - LL="ld" -fi +MPI_OFFSET_TYPE="long long" -# -if test -n "$ac_cv_sizeof_long_long"; then - if test $WITHIN_KNOWN_MPI_IMPL = no ; then - PAC_MPI_LONG_LONG_INT - else - AC_DEFINE(HAVE_MPI_LONG_LONG_INT,1,[Define if supports long long int]) - fi -fi -# -# check if MPI_Info functions are defined in the MPI implementation -if test $WITHIN_KNOWN_MPI_IMPL = no ; then - PAC_MPI_INFO -else - AC_DEFINE(HAVE_MPI_INFO,1,[Define if MPI Info is available]) - HAVE_MPI_INFO="#define HAVE_MPI_INFO" - MPI_FINFO1="!" - MPI_FINFO2="!" - MPI_FINFO3="!" - MPI_FINFO4="!" -fi -# -if test -n "$mpi_sgi"; then -dnl if test -z "$HAVE_MPI_INFO" ; then -dnl PAC_CHECK_MPI_SGI_INFO_NULL # is MPI_INFO_NULL defined in mpi.h? -dnl fi - PAC_TEST_MPI_SGI_type_is_contig - PAC_TEST_MPI_COMBINERS - PAC_TEST_MPI_HAVE_OFFSET_KIND -fi -# -# check if darray and subarray constructors are defined in the MPI -# implementation -if test $WITHIN_KNOWN_MPI_IMPL = no ; then - PAC_MPI_DARRAY_SUBARRAY -fi -if test $FROM_MPICH = yes ; then - dnl Made this a message instead of a warning because the warning is - dnl likely to confuse users. - AC_MSG_RESULT([Overriding Array test for MPICH]) - unset BUILD_MPI_ARRAY - AC_DEFINE(HAVE_MPI_DARRAY_SUBARRAY,1,[Define if Darray is available]) - HAVE_MPI_DARRAY_SUBARRAY="#define HAVE_MPI_DARRAY_SUBARRAY" - MPI_FARRAY1="!" - MPI_FARRAY2="!" - MPI_FARRAY3="!" - MPI_FARRAY4="!" - MPI_FARRAY5="!" - MPI_FARRAY6="!" - MPI_FARRAY7="!" -fi - # Check to see if weak symbols work correctly if test "$enable_weak_symbols" = "yes" ; then # Turn off weak symbols if they aren't available @@ -528,8 +451,6 @@ AC_SUBST(HAVE_WEAK_SYMBOLS) AM_CONDITIONAL([BUILD_ROMIO_EMBEDDED],[test "$WITHIN_KNOWN_MPI_IMPL" = "yes" ]) # FIXME need to get this right for non-MPICH builds -AM_CONDITIONAL([BUILD_MPIO_REQUEST],[false]) -# FIXME need to get this right for non-MPICH builds AM_CONDITIONAL([BUILD_MPIO_ERRHAN],[false]) # if we don't have weak symbol support, we must build a separate convenience @@ -1111,13 +1032,6 @@ if test -n "$mpi_mpich"; then fi fi -if test -n "$mpi_sgi"; then - AC_DEFINE(MPISGI,1,[Define if SGI MPI]) -fi - -if test -n "$mpi_hp"; then - AC_DEFINE(MPIHP,1,[Define if using HP MPI]) -fi # AC_CHECK_FUNCS(strerror) if test -z "$srcdir" -o "$srcdir" = "." ; then srcdir="$ROMIO_HOME" ; fi @@ -1190,9 +1104,6 @@ AC_SUBST(DOCTEXT) # if test $WITHIN_KNOWN_MPI_IMPL = no ; then PAC_TEST_MPI - PAC_NEEDS_FINT -else - NEEDS_MPI_FINT="" fi # if test "$MPI_INCLUDE_DIR" = "." ; then @@ -1218,11 +1129,8 @@ if test $FROM_OMPI = yes ; then ROMIO_INCLUDE= USER_CFLAGS= TEST_LIBNAME= - AC_DEFINE(HAVE_MPI_DARRAY_SUBARRAY,1,[Define if Darray is available]) - HAVE_MPI_DARRAY_SUBARRAY="#define HAVE_MPI_DARRAY_SUBARRAY" # Open MPI: see comments in mpi-io/mpioprof.h AC_DEFINE(MPIO_BUILD_PROFILING, 1, [hack to make ROMIO build without profiling]) - DEFINE_HAVE_MPI_GREQUEST="#define HAVE_MPI_GREQUEST" AC_DEFINE(HAVE_DECL_MPI_COMBINER_HINDEXED_BLOCK, 1, [Define if MPI library provides HINDEXED_BLOCK datatype]) elif test $FROM_MPICH = yes ; then # For now, separate the mpich from mpich cases @@ -1243,7 +1151,6 @@ elif test $FROM_MPICH = yes ; then # Turn off the building of the Fortran interface and the Info routines EXTRA_DIRS="" AC_DEFINE(HAVE_STATUS_SET_BYTES,1,[Define if status_set_bytes available]) - DEFINE_HAVE_MPI_GREQUEST="#define HAVE_MPI_GREQUEST 1" DEFINE_HAVE_MPI_GREQUEST_EXTENSIONS="#define HAVE_MPI_GREQUEST_EXTENSIONS 1" AC_DEFINE(HAVE_MPIX_H, 1, []) AC_DEFINE(HAVE_MPIIO_CONST, const, Set if MPI-IO prototypes use const qualifier) @@ -1332,12 +1239,6 @@ AM_CONDITIONAL([MPIO_GLUE_MPICH],[test "X$mpio_glue" = "Xmpich"]) AM_CONDITIONAL([MPIO_GLUE_OPENMPI],[test "X$mpio_glue" = "Xopenmpi"]) AM_CONDITIONAL([MPIO_GLUE_DEFAULT],[test "X$mpio_glue" = "Xdefault"]) -if test "$BUILD_MPI_INFO" = 1 ; then - EXTRA_SRC_DIRS="$EXTRA_SRC_DIRS mpi2-other/info" -fi -if test "$BUILD_MPI_ARRAY" = 1 ; then - EXTRA_SRC_DIRS="$EXTRA_SRC_DIRS mpi2-other/array" -fi AC_SUBST(EXTRA_SRC_DIRS) AC_SUBST(FILE_SYS_DIRS) @@ -1377,13 +1278,6 @@ AC_SUBST(LL) AC_SUBST(FROM_MPICH) AC_SUBST(FROM_LAM) AC_SUBST(WITHIN_KNOWN_MPI_IMPL) -AC_SUBST(NEEDS_MPI_FINT) -AC_SUBST(HAVE_MPI_INFO) -AC_SUBST(BUILD_MPI_INFO) -AC_SUBST(HAVE_MPI_DARRAY_SUBARRAY) -AC_SUBST(BUILD_MPI_ARRAY) -AC_SUBST(DEFINE_MPI_OFFSET) -AC_SUBST(DEFINE_HAVE_MPI_GREQUEST) AC_SUBST(MPI_OFFSET_TYPE) AC_SUBST(MPI_FINFO1) AC_SUBST(MPI_FINFO2) @@ -1419,7 +1313,6 @@ AC_SUBST(SHLIBNAME) dnl if test ! -d adio ; then mkdir adio ; fi if test ! -d adio/include ; then mkdir adio/include ; fi -if test ! -d mpi2-other ; then mkdir mpi2-other ; fi if test ! -d mpi-io ; then mkdir mpi-io ; fi if test ! -d mpi-io/glue ; then mkdir mpi-io/glue ; fi @@ -1428,8 +1321,6 @@ if test ! -d mpi-io/glue ; then mkdir mpi-io/glue ; fi AC_CONFIG_FILES([ Makefile localdefs - mpi2-other/info/Makefile - mpi2-other/array/Makefile test/Makefile test/misc.c test/large_file.c diff --git a/src/mpi/romio/include/mpio.h.in b/src/mpi/romio/include/mpio.h.in index 6aa84e38b6e..d420f4d4de1 100644 --- a/src/mpi/romio/include/mpio.h.in +++ b/src/mpi/romio/include/mpio.h.in @@ -28,59 +28,7 @@ extern "C" { typedef struct ADIOI_FileD *MPI_File; #endif -/* *INDENT-OFF* */ -@DEFINE_HAVE_MPI_GREQUEST@ -/* *INDENT-ON* */ -#ifndef HAVE_MPI_GREQUEST -typedef struct ADIOI_RequestD *MPIO_Request; -#else -#define MPIO_Request MPI_Request -#define MPIO_USES_MPI_REQUEST -/* Also rename the MPIO routines to get the MPI versions */ -#define MPIO_Wait MPI_Wait -#define MPIO_Test MPI_Test -#define PMPIO_Wait PMPI_Wait -#define PMPIO_Test PMPI_Test -#endif -#define MPIO_REQUEST_DEFINED - -#ifndef HAVE_MPI_OFFSET -/* *INDENT-OFF* */ -@DEFINE_MPI_OFFSET@ -/* *INDENT-ON* */ -/* If we needed to define MPI_Offset, then we also need to make - this definition. */ -#ifndef HAVE_MPI_DATAREP_FUNCTIONS -#define HAVE_MPI_DATAREP_FUNCTIONS -typedef int (MPI_Datarep_conversion_function)(void *, MPI_Datatype, int, - void *, MPI_Offset, void *); -typedef int (MPI_Datarep_conversion_function_c)(void *, MPI_Datatype, MPI_Count, - void *, MPI_Offset, void *); -typedef int (MPI_Datarep_extent_function)(MPI_Datatype datatype, MPI_Aint *, - void *); -#endif -#endif - -#ifndef NEEDS_MPI_FINT -/* *INDENT-OFF* */ -@NEEDS_MPI_FINT@ -/* *INDENT-ON* */ -#endif -#ifdef NEEDS_MPI_FINT -typedef int MPI_Fint; -#endif -#ifndef HAVE_MPI_INFO -/* *INDENT-OFF* */ -@HAVE_MPI_INFO@ -/* *INDENT-ON* */ -#endif -#ifndef HAVE_MPI_INFO - typedef struct MPIR_Info *MPI_Info; -# define MPI_INFO_NULL ((MPI_Info) 0) -# define MPI_MAX_INFO_KEY 255 -# define MPI_MAX_INFO_VAL 1024 -#endif #ifndef MPI_MODE_RDONLY /* only define these if they are not defined in mpi.h */ @@ -114,22 +62,6 @@ typedef int MPI_Fint; /* MPICH defines null object handles differently */ #define MPI_FILE_NULL ((MPI_File) 0) #endif -#define MPIO_REQUEST_NULL ((MPIO_Request) 0) - -#ifndef HAVE_MPI_DARRAY_SUBARRAY -/* *INDENT-OFF* */ -@HAVE_MPI_DARRAY_SUBARRAY@ -/* *INDENT-ON* */ -#endif -#ifndef HAVE_MPI_DARRAY_SUBARRAY -# define MPI_ORDER_C 56 -# define MPI_ORDER_FORTRAN 57 -# define MPI_DISTRIBUTE_BLOCK 121 -# define MPI_DISTRIBUTE_CYCLIC 122 -# define MPI_DISTRIBUTE_NONE 123 -# define MPI_DISTRIBUTE_DFLT_DARG -49767 -#endif - /* MPI-IO function prototypes */ @@ -170,13 +102,13 @@ int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, const void *buf, int c MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) ROMIO_API_PUBLIC; -/* nonblocking calls currently use MPIO_Request, because generalized +/* nonblocking calls currently use MPI_Request, because generalized requests not yet implemented. For the same reason, MPIO_Test and MPIO_Wait are used to test and wait on nonblocking I/O requests */ int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, - MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) ROMIO_API_PUBLIC; + MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) ROMIO_API_PUBLIC; int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, const void *buf, int count, - MPI_Datatype datatype, MPIO_Request *request) + MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) ROMIO_API_PUBLIC; /* Section 9.4.3 */ @@ -189,14 +121,14 @@ int MPI_File_write(MPI_File fh, const void *buf, int count, MPI_Datatype datatyp int MPI_File_write_all(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; -/* nonblocking calls currently use MPIO_Request, because generalized +/* nonblocking calls currently use MPI_Request, because generalized requests not yet implemented. For the same reason, MPIO_Test and MPIO_Wait are used to test and wait on nonblocking I/O requests */ -int MPI_File_iread(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) +int MPI_File_iread(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int MPI_File_iwrite(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, - MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; + MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence) ROMIO_API_PUBLIC; int MPI_File_get_position(MPI_File fh, MPI_Offset *offset) ROMIO_API_PUBLIC; @@ -208,9 +140,9 @@ int MPI_File_read_shared(MPI_File fh, void *buf, int count, MPI_Datatype datatyp int MPI_File_write_shared(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int MPI_File_iread_shared(MPI_File fh, void *buf, int count, MPI_Datatype datatype, - MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; + MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int MPI_File_iwrite_shared(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, - MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; + MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int MPI_File_read_ordered(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int MPI_File_write_ordered(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, @@ -313,31 +245,31 @@ int MPI_File_write_ordered_begin_c(MPI_File fh, const void *buf, MPI_Count count MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int MPI_File_write_shared_c(MPI_File fh, const void *buf, MPI_Count count, MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; -int MPI_File_iread_c(MPI_File fh, void *buf, MPI_Count count, MPI_Datatype datatype, MPIO_Request *request) +int MPI_File_iread_c(MPI_File fh, void *buf, MPI_Count count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int MPI_File_iread_all_c(MPI_File fh, void *buf, MPI_Count count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int MPI_File_iread_at_c(MPI_File fh, MPI_Offset offset, void *buf, MPI_Count count, MPI_Datatype datatype, - MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) ROMIO_API_PUBLIC; + MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) ROMIO_API_PUBLIC; int MPI_File_iread_at_all_c(MPI_File fh, MPI_Offset offset, void *buf, MPI_Count count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) ROMIO_API_PUBLIC; int MPI_File_iread_shared_c(MPI_File fh, void *buf, MPI_Count count, MPI_Datatype datatype, - MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; + MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int MPI_File_iwrite_c(MPI_File fh, const void *buf, MPI_Count count, MPI_Datatype datatype, - MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; + MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int MPI_File_iwrite_all_c(MPI_File fh, const void *buf, MPI_Count count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int MPI_File_iwrite_at_c(MPI_File fh, MPI_Offset offset, const void *buf, MPI_Count count, - MPI_Datatype datatype, MPIO_Request *request) + MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) ROMIO_API_PUBLIC; int MPI_File_iwrite_at_all_c(MPI_File fh, MPI_Offset offset, const void *buf, MPI_Count count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) ROMIO_API_PUBLIC; int MPI_File_iwrite_shared_c(MPI_File fh, const void *buf, MPI_Count count, MPI_Datatype datatype, - MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; + MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int MPI_File_get_type_extent_c(MPI_File fh, MPI_Datatype datatype, MPI_Count *extent) ROMIO_API_PUBLIC; @@ -347,86 +279,6 @@ int MPI_Register_datarep_c(const char *datarep, MPI_Datarep_conversion_function_ /* End Prototypes */ -#ifndef HAVE_MPI_DARRAY_SUBARRAY -/* Section 4.14.4 */ -int MPI_Type_create_subarray(int ndims, const int array_of_sizes[], const int array_of_subsizes[], - const int array_of_starts[], int order, MPI_Datatype oldtype, - MPI_Datatype *newtype) ROMIO_API_PUBLIC; - -/* Section 4.14.5 */ -int MPI_Type_create_darray(int size, int rank, int ndims, const int array_of_gsizes[], - const int array_of_distribs[], const int array_of_dargs[], - const int array_of_psizes, int order, MPI_Datatype oldtype, - MPI_Datatype *newtype) ROMIO_API_PUBLIC; -#endif - -/* The globus2 device has to rename MPI_ symbols in order to use the vendor - MPI as one of its transport mechanisms. Therefore, the following undefines - should only happen if MPICH_RENAMING_MPI_FUNCS is not defined. */ -/* Section 4.12.4 */ -#if !defined(MPICH_RENAMING_MPI_FUNCS) -#ifdef MPI_File_f2c -#undef MPI_File_f2c -#endif -#ifdef MPI_File_c2f -#undef MPI_File_c2f -#endif -#endif -/* above needed for some versions of mpi.h in MPICH!! */ -MPI_File MPI_File_f2c(MPI_Fint file) ROMIO_API_PUBLIC; -MPI_Fint MPI_File_c2f(MPI_File file) ROMIO_API_PUBLIC; - - -#ifndef HAVE_MPI_GREQUEST -/* The following functions are required if generalized requests are not - available, because in that case, an MPIO_Request object - is currently used for nonblocking I/O. */ -int MPIO_Test(MPIO_Request *request, int *flag, MPI_Status *status) ROMIO_API_PUBLIC; -int MPIO_Wait(MPIO_Request *request, MPI_Status *status) ROMIO_API_PUBLIC; -int MPIO_Testall(int count, MPIO_Request array_of_requests[], int *flag, - MPI_Status array_of_statuses[]) ROMIO_API_PUBLIC; -int MPIO_Waitall(int count, MPIO_Request array_of_requests[], MPI_Status array_of_statuses[]) ROMIO_API_PUBLIC; -int MPIO_Testany(int count, MPIO_Request array_of_requests[], int *indx, int *flag, - MPI_Status *status) ROMIO_API_PUBLIC; -int MPIO_Waitany(int count, MPIO_Request array_of_requests[], int *indx, MPI_Status *status) ROMIO_API_PUBLIC; -int MPIO_Waitsome(int incount, MPIO_Request array_of_requests[], int *outcount, - int array_of_indices[], MPI_Status array_of_statuses[]) ROMIO_API_PUBLIC; -int MPIO_Testsome(int incount, MPIO_Request array_of_requests[], int *outcount, - int array_of_indices[], MPI_Status array_of_statuses[]) ROMIO_API_PUBLIC; - -MPI_Fint MPIO_Request_c2f(MPIO_Request request) ROMIO_API_PUBLIC; -MPIO_Request MPIO_Request_f2c(MPI_Fint request) ROMIO_API_PUBLIC; -#endif /* HAVE_MPI_GREQUEST */ - -/* info functions if not defined in the MPI implementation */ -#ifndef HAVE_MPI_INFO - -int MPI_Info_create(MPI_Info *info) ROMIO_API_PUBLIC; -int MPI_Info_set(MPI_Info info, const char *key, const char *value) ROMIO_API_PUBLIC; -int MPI_Info_delete(MPI_Info info, const char *key) ROMIO_API_PUBLIC; -int MPI_Info_get(MPI_Info info, const char *key, int valuelen, char *value, int *flag) ROMIO_API_PUBLIC; -int MPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen, int *flag) ROMIO_API_PUBLIC; -int MPI_Info_get_nkeys(MPI_Info info, int *nkeys) ROMIO_API_PUBLIC; -int MPI_Info_get_nthkey(MPI_Info info, int n, char *key) ROMIO_API_PUBLIC; -int MPI_Info_dup(MPI_Info info, MPI_Info *newinfo) ROMIO_API_PUBLIC; -int MPI_Info_free(MPI_Info *info) ROMIO_API_PUBLIC; - -/* The globus2 device has to rename MPI_ symbols in order to use the vendor - MPI as one of its transport mechanisms. Therefore, the following undefines - should only happen if MPICH_RENAMING_MPI_FUNCS is not defined. */ -#if !defined(MPICH_RENAMING_MPI_FUNCS) -#ifdef MPI_Info_f2c -#undef MPI_Info_f2c -#endif -#ifdef MPI_Info_c2f -#undef MPI_Info_c2f -#endif -#endif -/* above needed for some versions of mpi.h in MPICH!! */ -MPI_Fint MPI_Info_c2f(MPI_Info info) ROMIO_API_PUBLIC; -MPI_Info MPI_Info_f2c(MPI_Fint info) ROMIO_API_PUBLIC; -#endif - #endif /* HAVE_PRAGMA_HP_SEC_DEF */ @@ -465,15 +317,15 @@ int PMPI_File_write_at_all(MPI_File, MPI_Offset, const void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) ROMIO_API_PUBLIC; -/* nonblocking calls currently use MPIO_Request, because generalized +/* nonblocking calls currently use MPI_Request, because generalized requests not yet implemented. For the same reason, MPIO_Test and MPIO_Wait are used to test and wait on nonblocking I/O requests */ int PMPI_File_iread_at(MPI_File, MPI_Offset, void *, - int, MPI_Datatype, MPIO_Request *) + int, MPI_Datatype, MPI_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) ROMIO_API_PUBLIC; int PMPI_File_iwrite_at(MPI_File, MPI_Offset, const void *, - int, MPI_Datatype, MPIO_Request *) + int, MPI_Datatype, MPI_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) ROMIO_API_PUBLIC; /* Section 9.4.3 */ @@ -486,13 +338,13 @@ int PMPI_File_write(MPI_File, const void *, int, MPI_Datatype, MPI_Status *) int PMPI_File_write_all(MPI_File, const void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; -/* nonblocking calls currently use MPIO_Request, because generalized +/* nonblocking calls currently use MPI_Request, because generalized requests not yet implemented. For the same reason, MPIO_Test and MPIO_Wait are used to test and wait on nonblocking I/O requests */ -int PMPI_File_iread(MPI_File, void *, int, MPI_Datatype, MPIO_Request *) +int PMPI_File_iread(MPI_File, void *, int, MPI_Datatype, MPI_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; -int PMPI_File_iwrite(MPI_File, const void *, int, MPI_Datatype, MPIO_Request *) +int PMPI_File_iwrite(MPI_File, const void *, int, MPI_Datatype, MPI_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int PMPI_File_seek(MPI_File, MPI_Offset, int) ROMIO_API_PUBLIC; @@ -505,10 +357,10 @@ int PMPI_File_read_shared(MPI_File, void *, int, MPI_Datatype, MPI_Status *) int PMPI_File_write_shared(MPI_File, const void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int PMPI_File_iread_shared(MPI_File, void *, int, - MPI_Datatype, MPIO_Request *) + MPI_Datatype, MPI_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int PMPI_File_iwrite_shared(MPI_File, const void *, int, - MPI_Datatype, MPIO_Request *) + MPI_Datatype, MPI_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int PMPI_File_read_ordered(MPI_File, void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; @@ -616,31 +468,31 @@ int PMPI_File_write_ordered_begin_c(MPI_File fh, const void *buf, MPI_Count coun MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int PMPI_File_write_shared_c(MPI_File fh, const void *buf, MPI_Count count, MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; -int PMPI_File_iread_c(MPI_File fh, void *buf, MPI_Count count, MPI_Datatype datatype, MPIO_Request *request) +int PMPI_File_iread_c(MPI_File fh, void *buf, MPI_Count count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int PMPI_File_iread_all_c(MPI_File fh, void *buf, MPI_Count count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int PMPI_File_iread_at_c(MPI_File fh, MPI_Offset offset, void *buf, MPI_Count count, MPI_Datatype datatype, - MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) ROMIO_API_PUBLIC; + MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) ROMIO_API_PUBLIC; int PMPI_File_iread_at_all_c(MPI_File fh, MPI_Offset offset, void *buf, MPI_Count count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) ROMIO_API_PUBLIC; int PMPI_File_iread_shared_c(MPI_File fh, void *buf, MPI_Count count, MPI_Datatype datatype, - MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; + MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int PMPI_File_iwrite_c(MPI_File fh, const void *buf, MPI_Count count, MPI_Datatype datatype, - MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; + MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int PMPI_File_iwrite_all_c(MPI_File fh, const void *buf, MPI_Count count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int PMPI_File_iwrite_at_c(MPI_File fh, MPI_Offset offset, const void *buf, MPI_Count count, - MPI_Datatype datatype, MPIO_Request *request) + MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) ROMIO_API_PUBLIC; int PMPI_File_iwrite_at_all_c(MPI_File fh, MPI_Offset offset, const void *buf, MPI_Count count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) ROMIO_API_PUBLIC; int PMPI_File_iwrite_shared_c(MPI_File fh, const void *buf, MPI_Count count, MPI_Datatype datatype, - MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; + MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) ROMIO_API_PUBLIC; int PMPI_File_get_type_extent_c(MPI_File fh, MPI_Datatype datatype, MPI_Count *extent) ROMIO_API_PUBLIC; @@ -648,53 +500,6 @@ int PMPI_Register_datarep_c(const char *datarep, MPI_Datarep_conversion_function MPI_Datarep_conversion_function_c *write_conversion_fn, MPI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state) ROMIO_API_PUBLIC; -#ifndef HAVE_MPI_DARRAY_SUBARRAY -/* Section 4.14.4 */ -int PMPI_Type_create_subarray(int, int *, int *, int *, int, - MPI_Datatype, MPI_Datatype *) ROMIO_API_PUBLIC; - -/* Section 4.14.5 */ -int PMPI_Type_create_darray(int, int, int, int *, int *, - int *, int *, int, MPI_Datatype, MPI_Datatype *) ROMIO_API_PUBLIC; -#endif - -/* Section 4.12.4 */ -MPI_File PMPI_File_f2c(MPI_Fint) ROMIO_API_PUBLIC; -MPI_Fint PMPI_File_c2f(MPI_File) ROMIO_API_PUBLIC; - -#ifndef HAVE_MPI_GREQUEST -/* The following functions are required if generalized requests are not - available, because in that case, an MPIO_Request object - is currently used for nonblocking I/O. */ -int PMPIO_Test(MPIO_Request *, int *, MPI_Status *) ROMIO_API_PUBLIC; -int PMPIO_Wait(MPIO_Request *, MPI_Status *) ROMIO_API_PUBLIC; -int PMPIO_Testall(int, MPIO_Request *, int *, MPI_Status *) ROMIO_API_PUBLIC; -int PMPIO_Waitall(int, MPIO_Request *, MPI_Status *) ROMIO_API_PUBLIC; -int PMPIO_Testany(int, MPIO_Request *, int *, int *, MPI_Status *) ROMIO_API_PUBLIC; -int PMPIO_Waitany(int, MPIO_Request *, int *, MPI_Status *) ROMIO_API_PUBLIC; -int PMPIO_Waitsome(int, MPIO_Request *, int *, int *, MPI_Status *) ROMIO_API_PUBLIC; -int PMPIO_Testsome(int, MPIO_Request *, int *, int *, MPI_Status *) ROMIO_API_PUBLIC; -MPI_Fint PMPIO_Request_c2f(MPIO_Request) ROMIO_API_PUBLIC; -MPIO_Request PMPIO_Request_f2c(MPI_Fint) ROMIO_API_PUBLIC; -#endif /* HAVE_MPI_GREQUEST */ - -/* info functions if not defined in the MPI implementation */ -#ifndef HAVE_MPI_INFO - -int PMPI_Info_create(MPI_Info *) ROMIO_API_PUBLIC; -int PMPI_Info_set(MPI_Info, char *, char *) ROMIO_API_PUBLIC; -int PMPI_Info_delete(MPI_Info, char *) ROMIO_API_PUBLIC; -int PMPI_Info_get(MPI_Info, char *, int, char *, int *) ROMIO_API_PUBLIC; -int PMPI_Info_get_valuelen(MPI_Info, char *, int *, int *) ROMIO_API_PUBLIC; -int PMPI_Info_get_nkeys(MPI_Info, int *) ROMIO_API_PUBLIC; -int PMPI_Info_get_nthkey(MPI_Info, int, char *) ROMIO_API_PUBLIC; -int PMPI_Info_dup(MPI_Info, MPI_Info *) ROMIO_API_PUBLIC; -int PMPI_Info_free(MPI_Info *) ROMIO_API_PUBLIC; - -MPI_Fint PMPI_Info_c2f(MPI_Info) ROMIO_API_PUBLIC; -MPI_Info PMPI_Info_f2c(MPI_Fint) ROMIO_API_PUBLIC; -#endif - #if defined(__cplusplus) } #endif diff --git a/src/mpi/romio/mpi-io/Makefile.mk b/src/mpi/romio/mpi-io/Makefile.mk index 71a134d8cbd..4ea0d108477 100644 --- a/src/mpi/romio/mpi-io/Makefile.mk +++ b/src/mpi/romio/mpi-io/Makefile.mk @@ -12,8 +12,6 @@ if BUILD_BINDING romio_mpi_sources += \ mpi-io/close.c \ mpi-io/delete.c \ - mpi-io/file_c2f.c \ - mpi-io/file_f2c.c \ mpi-io/fsync.c \ mpi-io/get_amode.c \ mpi-io/get_atom.c \ @@ -80,29 +78,11 @@ romio_other_sources += \ mpi-io/mpiu_external32.c \ mpi-io/mpir_cst_filesys.c -# helper variables for conditionally compiled sources -mpio_request_sources= \ - mpi-io/ioreq_c2f.c \ - mpi-io/ioreq_f2c.c \ - mpi-io/iotest.c \ - mpi-io/iotestall.c \ - mpi-io/iotestany.c \ - mpi-io/iotestsome.c \ - mpi-io/iowait.c \ - mpi-io/iowaitall.c \ - mpi-io/iowaitany.c \ - mpi-io/iowaitsome.c - mpio_extra_sources = \ mpi-io/get_errh.c \ mpi-io/set_errh.c -# not used in MPICH, we use generalized requests instead -if BUILD_MPIO_REQUEST -romio_other_sources += $(mpio_request_sources) -endif BUILD_MPIO_REQUEST - # not used in MPICH if BUILD_MPIO_ERRHAN -romio_other_sources += $(mpio_request_sources) +romio_other_sources += $(mpio_extra_sources) endif BUILD_MPIO_ERRHAN diff --git a/src/mpi/romio/mpi-io/file_c2f.c b/src/mpi/romio/mpi-io/file_c2f.c deleted file mode 100644 index c7c4e3197f6..00000000000 --- a/src/mpi/romio/mpi-io/file_c2f.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPI_File_c2f = PMPI_File_c2f -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPI_File_c2f MPI_File_c2f -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPI_File_c2f as PMPI_File_c2f -/* end of weak pragmas */ -#elif defined(HAVE_ATTR_WEAK_ALIAS) -MPI_Fint MPI_File_c2f(MPI_File fh) __attribute__ ((weak, alias("PMPI_File_c2f"))); -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif -#include "adio_extern.h" - -/*@ - MPI_File_c2f - Translates a C file handle to a Fortran file handle - -Input Parameters: -. fh - C file handle (handle) - -Return Value: - Fortran file handle (integer) -@*/ -MPI_Fint MPI_File_c2f(MPI_File fh) -{ - MPI_Fint val = MPIO_File_c2f(fh); - if (val > 0) - val += ROMIO_HANDLE_OFFSET; - return val; -} diff --git a/src/mpi/romio/mpi-io/file_f2c.c b/src/mpi/romio/mpi-io/file_f2c.c deleted file mode 100644 index 4dcdeeae27d..00000000000 --- a/src/mpi/romio/mpi-io/file_f2c.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPI_File_f2c = PMPI_File_f2c -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPI_File_f2c MPI_File_f2c -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPI_File_f2c as PMPI_File_f2c -/* end of weak pragmas */ -#elif defined(HAVE_ATTR_WEAK_ALIAS) -MPI_File MPI_File_f2c(MPI_Fint fh) __attribute__ ((weak, alias("PMPI_File_f2c"))); -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif -#include "adio_extern.h" - -/*@ - MPI_File_f2c - Translates a Fortran file handle to a C file handle - -Input Parameters: -. fh - Fortran file handle (integer) - -Return Value: - C file handle (handle) -@*/ -MPI_File MPI_File_f2c(MPI_Fint fh) -{ - if (fh > 0) - fh -= ROMIO_HANDLE_OFFSET; - return MPIO_File_f2c(fh); -} diff --git a/src/mpi/romio/mpi-io/glue/default/mpio_file.c b/src/mpi/romio/mpi-io/glue/default/mpio_file.c index 5e03b787afc..4c6eb94b9c2 100644 --- a/src/mpi/romio/mpi-io/glue/default/mpio_file.c +++ b/src/mpi/romio/mpi-io/glue/default/mpio_file.c @@ -38,13 +38,13 @@ extern ADIO_File *ADIOI_Ftable; extern int ADIOI_Ftable_ptr; extern int ADIOI_Ftable_max; -MPI_File MPIO_File_f2c(MPI_Fint fh) +MPI_File MPIO_File_fromint(int fh) { #ifndef INT_LT_POINTER return (MPI_File) ((void *) fh); /* the extra cast is to get rid of a compiler warning on Exemplar. * The warning is because MPI_File points to a structure containing - * longlongs, which may be 8-byte aligned. But MPI_Fint itself + * longlongs, which may be 8-byte aligned. But int itself * may not be 8-byte aligned. */ #else if (!fh) @@ -58,15 +58,15 @@ MPI_File MPIO_File_f2c(MPI_Fint fh) #endif } -MPI_Fint MPIO_File_c2f(MPI_File fh) +int MPIO_File_toint(MPI_File fh) { #ifndef INT_LT_POINTER - return (MPI_Fint) fh; + return (int) fh; #else int i; if ((fh == MPI_FILE_NULL) || (fh->cookie != ADIOI_FILE_COOKIE)) - return (MPI_Fint) 0; + return (int) 0; if (!ADIOI_Ftable) { ADIOI_Ftable_max = 1024; ADIOI_Ftable = (MPI_File *) @@ -85,6 +85,6 @@ MPI_Fint MPIO_File_c2f(MPI_File fh) } ADIOI_Ftable_ptr++; ADIOI_Ftable[ADIOI_Ftable_ptr] = fh; - return (MPI_Fint) ADIOI_Ftable_ptr; + return (int) ADIOI_Ftable_ptr; #endif } diff --git a/src/mpi/romio/mpi-io/glue/mpich/mpio_file.c b/src/mpi/romio/mpi-io/glue/mpich/mpio_file.c index 54906393b8a..01bfa20ba82 100644 --- a/src/mpi/romio/mpi-io/glue/mpich/mpio_file.c +++ b/src/mpi/romio/mpi-io/glue/mpich/mpio_file.c @@ -36,13 +36,13 @@ void MPIO_File_free(MPI_File * mpi_fh) *mpi_fh = MPI_FILE_NULL; } -MPI_File MPIO_File_f2c(MPI_Fint fh) +MPI_File MPIO_File_fromint(int fh) { #ifndef INT_LT_POINTER return (MPI_File) ((void *) (intptr_t) fh); /* the extra cast is to get rid of a compiler warning on Exemplar. * The warning is because MPI_File points to a structure containing - * longlongs, which may be 8-byte aligned. But MPI_Fint itself + * longlongs, which may be 8-byte aligned. But int itself * may not be 8-byte aligned. */ #else if (!fh) @@ -55,15 +55,15 @@ MPI_File MPIO_File_f2c(MPI_Fint fh) #endif } -MPI_Fint MPIO_File_c2f(MPI_File fh) +int MPIO_File_toint(MPI_File fh) { #ifndef INT_LT_POINTER - return (MPI_Fint) (intptr_t) fh; + return (int) (intptr_t) fh; #else int i; if ((fh == MPI_FILE_NULL) || (fh->cookie != ADIOI_FILE_COOKIE)) - return (MPI_Fint) 0; + return (int) 0; if (fh->fortran_handle != -1) return fh->fortran_handle; @@ -87,6 +87,6 @@ MPI_Fint MPIO_File_c2f(MPI_File fh) ADIOI_Ftable_ptr++; ADIOI_Ftable[ADIOI_Ftable_ptr] = fh; fh->fortran_handle = ADIOI_Ftable_ptr; - return (MPI_Fint) ADIOI_Ftable_ptr; + return (int) ADIOI_Ftable_ptr; #endif } diff --git a/src/mpi/romio/mpi-io/glue/openmpi/mpio_file.c b/src/mpi/romio/mpi-io/glue/openmpi/mpio_file.c index 3c1dbebbe6e..10bfb18fc63 100644 --- a/src/mpi/romio/mpi-io/glue/openmpi/mpio_file.c +++ b/src/mpi/romio/mpi-io/glue/openmpi/mpio_file.c @@ -40,13 +40,13 @@ void MPIO_File_free(MPI_File * mpi_fh) #if 0 -MPI_File MPIO_File_f2c(MPI_Fint fh) +MPI_File MPIO_File_fromint(int fh) { #ifndef INT_LT_POINTER return (MPI_File) ((void *) fh); /* the extra cast is to get rid of a compiler warning on Exemplar. * The warning is because MPI_File points to a structure containing - * longlongs, which may be 8-byte aligned. But MPI_Fint itself + * longlongs, which may be 8-byte aligned. But int itself * may not be 8-byte aligned. */ #else if (!fh) @@ -59,15 +59,15 @@ MPI_File MPIO_File_f2c(MPI_Fint fh) #endif } -MPI_Fint MPIO_File_c2f(MPI_File fh) +int MPIO_File_toint(MPI_File fh) { #ifndef INT_LT_POINTER - return (MPI_Fint) fh; + return (int) fh; #else int i; if ((fh == MPI_FILE_NULL) || (fh->cookie != ADIOI_FILE_COOKIE)) - return (MPI_Fint) 0; + return (int) 0; if (!ADIOI_Ftable) { ADIOI_Ftable_max = 1024; ADIOI_Ftable = (MPI_File *) @@ -86,7 +86,7 @@ MPI_Fint MPIO_File_c2f(MPI_File fh) } ADIOI_Ftable_ptr++; ADIOI_Ftable[ADIOI_Ftable_ptr] = fh; - return (MPI_Fint) ADIOI_Ftable_ptr; + return (int) ADIOI_Ftable_ptr; #endif } diff --git a/src/mpi/romio/mpi-io/io_impl.c b/src/mpi/romio/mpi-io/io_impl.c index c1535546b8c..82a5e0c5820 100644 --- a/src/mpi/romio/mpi-io/io_impl.c +++ b/src/mpi/romio/mpi-io/io_impl.c @@ -23,7 +23,7 @@ static int MPIOI_File_iwrite_all(MPI_File fh, MPI_Offset offset, int file_ptr_ty const void *buf, MPI_Aint count, MPI_Datatype datatype, MPI_Request * request); static int MPIOI_File_iwrite_shared(MPI_File fh, const void *buf, MPI_Aint count, - MPI_Datatype datatype, MPIO_Request * request); + MPI_Datatype datatype, MPI_Request * request); static int MPIOI_File_read(MPI_File fh, MPI_Offset offset, int file_ptr_type, void *buf, MPI_Aint count, MPI_Datatype datatype, MPI_Status * status); static int MPIOI_File_read_all(MPI_File fh, MPI_Offset offset, int file_ptr_type, @@ -1238,19 +1238,19 @@ int MPIR_Register_datarep_large_impl(ROMIO_CONST char *datarep, dtype_file_extent_fn, extra_state, is_large); } -MPI_Fint MPIR_File_c2f_impl(MPI_File fh) +int MPIR_File_toint_impl(MPI_File fh) { - MPI_Fint val = MPIO_File_c2f(fh); + int val = MPIO_File_toint(fh); if (val > 0) val += ROMIO_HANDLE_OFFSET; return val; } -MPI_File MPIR_File_f2c_impl(MPI_Fint fh) +MPI_File MPIR_File_fromint_impl(int fh) { if (fh > 0) fh -= ROMIO_HANDLE_OFFSET; - return MPIO_File_f2c(fh); + return MPIO_File_fromint(fh); } /* internal routines */ @@ -1705,7 +1705,7 @@ static int MPIOI_File_iwrite_all(MPI_File fh, MPI_Offset offset, int file_ptr_ty } static int MPIOI_File_iwrite_shared(MPI_File fh, const void *buf, MPI_Aint count, - MPI_Datatype datatype, MPIO_Request * request) + MPI_Datatype datatype, MPI_Request * request) { int error_code, buftype_is_contig, filetype_is_contig; ADIO_File adio_fh; diff --git a/src/mpi/romio/mpi-io/ioreq_c2f.c b/src/mpi/romio/mpi-io/ioreq_c2f.c deleted file mode 100644 index 431bdda63dd..00000000000 --- a/src/mpi/romio/mpi-io/ioreq_c2f.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPIO_Request_c2f = PMPIO_Request_c2f -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPIO_Request_c2f MPIO_Request_c2f -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPIO_Request_c2f as PMPIO_Request_c2f -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif -#include "adio_extern.h" - -/*@ - MPIO_Request_c2f - Translates a C I/O-request handle to a - Fortran I/O-request handle - -Input Parameters: -. request - C I/O-request handle (handle) - -Return Value: - Fortran I/O-request handle (integer) -@*/ -#ifdef HAVE_MPI_GREQUEST -MPI_Fint MPIO_Request_c2f(MPIO_Request request) -{ - return ((MPI_Fint) request); -} -#else - -MPI_Fint MPIO_Request_c2f(MPIO_Request request) -{ -#ifndef INT_LT_POINTER - return (MPI_Fint) request; -#else - int i; - - /* We can make this test outside of the GLOBAL mutex because it does - * not access any shared data */ - if ((request <= (MPIO_Request) 0) || (request->cookie != ADIOI_REQ_COOKIE)) { - return (MPI_Fint) 0; - } - - ROMIO_THREAD_CS_ENTER(); - if (!ADIOI_Reqtable) { - ADIOI_Reqtable_max = 1024; - ADIOI_Reqtable = (MPIO_Request *) - ADIOI_Malloc(ADIOI_Reqtable_max * sizeof(MPIO_Request)); - ADIOI_Reqtable_ptr = 0; /* 0 can't be used though, because - * MPIO_REQUEST_NULL=0 */ - for (i = 0; i < ADIOI_Reqtable_max; i++) - ADIOI_Reqtable[i] = MPIO_REQUEST_NULL; - } - if (ADIOI_Reqtable_ptr == ADIOI_Reqtable_max - 1) { - ADIOI_Reqtable = (MPIO_Request *) ADIOI_Realloc(ADIOI_Reqtable, - (ADIOI_Reqtable_max + - 1024) * sizeof(MPIO_Request)); - for (i = ADIOI_Reqtable_max; i < ADIOI_Reqtable_max + 1024; i++) - ADIOI_Reqtable[i] = MPIO_REQUEST_NULL; - ADIOI_Reqtable_max += 1024; - } - ADIOI_Reqtable_ptr++; - ADIOI_Reqtable[ADIOI_Reqtable_ptr] = request; - - ROMIO_THREAD_CS_EXIT(); - return (MPI_Fint) ADIOI_Reqtable_ptr; -#endif -} -#endif diff --git a/src/mpi/romio/mpi-io/ioreq_f2c.c b/src/mpi/romio/mpi-io/ioreq_f2c.c deleted file mode 100644 index c2449e5a148..00000000000 --- a/src/mpi/romio/mpi-io/ioreq_f2c.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPIO_Request_f2c = PMPIO_Request_f2c -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPIO_Request_f2c MPIO_Request_f2c -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPIO_Request_f2c as PMPIO_Request_f2c -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif -#include "adio_extern.h" - -/*@ - MPIO_Request_f2c - Translates a Fortran I/O-request handle to - a C I/O-request handle - -Input Parameters: -. request - Fortran I/O-request handle (integer) - -Return Value: - C I/O-request handle (handle) -@*/ -#ifdef HAVE_MPI_GREQUEST -MPIO_Request MPIO_Request_f2c(MPI_Fint request) -{ - return ((MPIO_Request) request); -} -#else -MPIO_Request MPIO_Request_f2c(MPI_Fint request) -{ - int error_code; - static char myname[] = "MPIO_REQUEST_F2C"; - -#ifndef INT_LT_POINTER - return (MPIO_Request) request; -#else - - ROMIO_THREAD_CS_ENTER(); - - if (!request) { - return MPIO_REQUEST_NULL; - } - /* --BEGIN ERROR HANDLING-- */ - if ((request < 0) || (request > ADIOI_Reqtable_ptr)) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_REQUEST, "**request", 0); - error_code = MPIO_Err_return_file(MPI_FILE_NULL, error_code); - return MPIO_REQUEST_NULL; - } - /* --END ERROR HANDLING-- */ - - fn_exit: - ROMIO_THREAD_CS_EXIT(); - return ADIOI_Reqtable[request]; -#endif -} -#endif diff --git a/src/mpi/romio/mpi-io/iotest.c b/src/mpi/romio/mpi-io/iotest.c deleted file mode 100644 index 311d3cf68b0..00000000000 --- a/src/mpi/romio/mpi-io/iotest.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPIO_Test = PMPIO_Test -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPIO_Test MPIO_Test -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPIO_Test as PMPIO_Test -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/* status object not filled currently */ - -/*@ - MPIO_Test - Test the completion of a nonblocking read or write - -Input Parameters: -. request - request object (handle) - -Output Parameters: -. flag - true if operation completed (logical) -. status - status object (Status) - -.N fortran -@*/ -#ifdef HAVE_MPI_GREQUEST -int MPIO_Test(MPIO_Request * request, int *flag, MPI_Status * status) -{ - return (MPI_Test(request, flag, status)); -} -#else -int MPIO_Test(MPIO_Request * request, int *flag, MPI_Status * status) -{ - int error_code; - static char myname[] = "MPIO_TEST"; - - ROMIO_THREAD_CS_ENTER(); - - if (*request == MPIO_REQUEST_NULL) { - error_code = MPI_SUCCESS; - goto fn_exit; - } - - /* --BEGIN ERROR HANDLING-- */ - if ((*request < (MPIO_Request) 0) || ((*request)->cookie != ADIOI_REQ_COOKIE)) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_REQUEST, "**request", 0); - error_code = MPIO_Err_return_file(MPI_FILE_NULL, error_code); - goto fn_exit; - } - /* --END ERROR HANDLING-- */ - - switch ((*request)->optype) { - case ADIOI_READ: - *flag = ADIO_ReadDone(request, status, &error_code); - break; - case ADIOI_WRITE: - *flag = ADIO_WriteDone(request, status, &error_code); - break; - } - - - fn_exit: - ROMIO_THREAD_CS_EXIT(); - return error_code; -} -#endif diff --git a/src/mpi/romio/mpi-io/iotestall.c b/src/mpi/romio/mpi-io/iotestall.c deleted file mode 100644 index 8c5382b8943..00000000000 --- a/src/mpi/romio/mpi-io/iotestall.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPIO_Testall = PMPIO_Testall -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPIO_Testall MPIO_Testall -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPIO_Testall as PMPIO_Testall -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/* - This is a temporary function until we switch to using MPI-2's generalized - requests. -*/ - -int MPIO_Testall(int count, MPIO_Request requests[], int *flag, MPI_Status statuses[]) -{ - int done, i, err; - - ROMIO_THREAD_CS_ENTER(); - if (count == 1) { - err = MPIO_Test(requests, flag, statuses); - goto fn_exit; - } - - /* This is actually very difficult to do. We can't use MPIO_Test, - * since we must change the requests only if *ALL* requests are complete - */ - /* FIXME: THIS IS NOT CORRECT (see above). But most applications won't - * care */ - done = 1; - for (i = 0; i < count; i++) { - if (requests[i] != MPIO_REQUEST_NULL) { - err = MPIO_Test(&requests[i], flag, &statuses[i]); - if (!*flag) - done = 0; - if (err) - goto fn_exit; - } else { -#ifdef MPICH - /* need to set empty status */ - if (statuses != MPI_STATUSES_IGNORE) { - statuses[i].MPI_SOURCE = MPI_ANY_SOURCE; - statuses[i].MPI_TAG = MPI_ANY_TAG; - MPIR_STATUS_SET_COUNT(statuses[i], 0); - MPIR_STATUS_SET_CANCEL_BIT(statuses[i], 0); - } -#else - ; -#endif - } - } - - *flag = done; - - err = MPI_SUCCESS; - fn_exit: - ROMIO_THREAD_CS_EXIT(); - return err; -} diff --git a/src/mpi/romio/mpi-io/iotestany.c b/src/mpi/romio/mpi-io/iotestany.c deleted file mode 100644 index 16e3e9fa1cd..00000000000 --- a/src/mpi/romio/mpi-io/iotestany.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPIO_Testany = PMPIO_Testany -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPIO_Testany MPIO_Testany -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPIO_Testany as PMPIO_Testany -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/* - This is a temporary function until we switch to using MPI-2's generalized - requests. -*/ - -int MPIO_Testany(int count, MPIO_Request requests[], int *index, int *flag, MPI_Status * status) -{ - int i, err; - - ROMIO_THREAD_CS_ENTER(); - - if (count == 1) { - err = MPIO_Test(requests, flag, status); - if (!err) - *index = 0; - goto fn_exit; - } - - /* Check for no active requests */ - for (i = 0; i < count; i++) { - if (requests[i] != MPIO_REQUEST_NULL) { - break; - } - } - if (i == count) { - *index = MPI_UNDEFINED; -#ifdef MPICH - /* need to set empty status */ - if (status != MPI_STATUS_IGNORE) { - status->MPI_SOURCE = MPI_ANY_SOURCE; - status->MPI_TAG = MPI_ANY_TAG; - MPIR_STATUS_SET_COUNT(*status, 0); - MPIR_STATUS_SET_CANCEL_BIT(*status, 0); - } -#endif - err = MPI_SUCCESS; - goto fn_exit; - } - - err = MPI_SUCCESS; - for (i = 0; i < count; i++) { - if (requests[i] != MPIO_REQUEST_NULL) { - err = MPIO_Test(&requests[i], flag, status); - if (*flag) { - if (!err) - *index = i; - break; - } - } - } - - - fn_exit: - ROMIO_THREAD_CS_EXIT(); - return err; -} diff --git a/src/mpi/romio/mpi-io/iotestsome.c b/src/mpi/romio/mpi-io/iotestsome.c deleted file mode 100644 index 16ac4e7373e..00000000000 --- a/src/mpi/romio/mpi-io/iotestsome.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPIO_Testsome = PMPIO_Testsome -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPIO_Testsome MPIO_Testsome -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPIO_Testsome as PMPIO_Testsome -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/* - This is a temporary function until we switch to using MPI-2's generalized - requests. -*/ - -int MPIO_Testsome(int count, MPIO_Request requests[], int *outcount, - int indices[], MPI_Status * statuses) -{ - int i, err; - int flag; - - ROMIO_THREAD_CS_ENTER(); - - if (count == 1) { - err = MPIO_Test(requests, &flag, statuses); - if (!err) { - if (flag) { - indices[0] = 0; - *outcount = 1; - } else { - *outcount = 0; - } - } - goto fn_exit; - } - - /* Check for no active requests */ - for (i = 0; i < count; i++) { - if (requests[i] != MPIO_REQUEST_NULL) { - break; - } - } - if (i == count) { - *outcount = MPI_UNDEFINED; - err = MPI_SUCCESS; - goto fn_exit; - } - - err = MPI_SUCCESS; - *outcount = 0; - for (i = 0; i < count; i++) { - if (requests[i] != MPIO_REQUEST_NULL) { - err = MPIO_Test(&requests[i], &flag, statuses); - if (flag) { - if (!err) { - indices[0] = i; - indices++; - statuses++; - *outcount = *outcount + 1; - } - } - } - } - - fn_exit: - - ROMIO_THREAD_CS_EXIT(); - return err; -} diff --git a/src/mpi/romio/mpi-io/iowait.c b/src/mpi/romio/mpi-io/iowait.c deleted file mode 100644 index fcf212f1407..00000000000 --- a/src/mpi/romio/mpi-io/iowait.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPIO_Wait = PMPIO_Wait -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPIO_Wait MPIO_Wait -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPIO_Wait as PMPIO_Wait -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/* status object not filled currently */ - -/*@ - MPIO_Wait - Waits for the completion of a nonblocking read or write - -Input Parameters: -. request - request object (handle) - -Output Parameters: -. status - status object (Status) - -.N fortran -@*/ -#ifdef HAVE_MPI_GREQUEST -int MPIO_Wait(MPIO_Request * request, MPI_Status * status) -{ - return (MPI_Wait(request, status)); -} -#else -int MPIO_Wait(MPIO_Request * request, MPI_Status * status) -{ - int error_code; - static char myname[] = "MPIO_WAIT"; - - - ROMIO_THREAD_CS_ENTER(); - - if (*request == MPIO_REQUEST_NULL) { - error_code = MPI_SUCCESS; - goto fn_exit; - } - - - /* --BEGIN ERROR HANDLING-- */ - if ((*request < (MPIO_Request) 0) || ((*request)->cookie != ADIOI_REQ_COOKIE)) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_REQUEST, "**request", 0); - error_code = MPIO_Err_return_file(MPI_FILE_NULL, error_code); - goto fn_exit; - } - /* --END ERROR HANDLING-- */ - - switch ((*request)->optype) { - case ADIOI_READ: - ADIO_ReadComplete(request, status, &error_code); - break; - case ADIOI_WRITE: - ADIO_WriteComplete(request, status, &error_code); - break; - } - - - fn_exit: - ROMIO_THREAD_CS_EXIT(); - return error_code; -} -#endif diff --git a/src/mpi/romio/mpi-io/iowaitall.c b/src/mpi/romio/mpi-io/iowaitall.c deleted file mode 100644 index 78980a96820..00000000000 --- a/src/mpi/romio/mpi-io/iowaitall.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPIO_Waitall = PMPIO_Waitall -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPIO_Waitall MPIO_Waitall -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPIO_Waitall as PMPIO_Waitall -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/* - This is a temporary function until we switch to using MPI-2's generalized - requests. -*/ - -int MPIO_Waitall(int count, MPIO_Request requests[], MPI_Status statuses[]) -{ - int notdone, i, flag, err; - - ROMIO_THREAD_CS_ENTER(); - - if (count == 1) { - err = MPIO_Wait(requests, statuses); - goto fn_exit; - } - - - do { - notdone = 0; - for (i = 0; i < count; i++) { - if (requests[i] != MPIO_REQUEST_NULL) { - err = MPIO_Test(&requests[i], &flag, &statuses[i]); - if (!flag) - notdone = 1; - if (err) - goto fn_exit; - } else { -#ifdef MPICH - /* need to set empty status */ - if (statuses != MPI_STATUSES_IGNORE) { - statuses[i].MPI_SOURCE = MPI_ANY_SOURCE; - statuses[i].MPI_TAG = MPI_ANY_TAG; - MPIR_STATUS_SET_COUNT(statuses[i], 0); - MPIR_STATUS_SET_CANCEL_BIT(statuses[i], 0); - } -#else - ; -#endif - } - } - } while (notdone); - - err = MPI_SUCCESS; - fn_exit: - - ROMIO_THREAD_CS_EXIT(); - return err; -} diff --git a/src/mpi/romio/mpi-io/iowaitany.c b/src/mpi/romio/mpi-io/iowaitany.c deleted file mode 100644 index 79b8172c67e..00000000000 --- a/src/mpi/romio/mpi-io/iowaitany.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPIO_Waitany = PMPIO_Waitany -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPIO_Waitany MPIO_Waitany -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPIO_Waitany as PMPIO_Waitany -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/* - This is a temporary function until we switch to using MPI-2's generalized - requests. -*/ - -int MPIO_Waitany(int count, MPIO_Request requests[], int *index, MPI_Status * status) -{ - int i, flag, err; - - ROMIO_THREAD_CS_ENTER(); - - if (count == 1) { - err = MPIO_Wait(requests, status); - if (!err) - *index = 0; - goto fn_exit; - } - - /* Check for no active requests */ - for (i = 0; i < count; i++) { - if (requests[i] != MPIO_REQUEST_NULL) { - break; - } - } - if (i == count) { - *index = MPI_UNDEFINED; -#ifdef MPICH - /* need to set empty status */ - if (status != MPI_STATUS_IGNORE) { - status->MPI_SOURCE = MPI_ANY_SOURCE; - status->MPI_TAG = MPI_ANY_TAG; - MPIR_STATUS_SET_COUNT(*status, 0); - MPIR_STATUS_SET_CANCEL_BIT(*status, 0); - } -#endif - err = MPI_SUCCESS; - goto fn_exit; - } - - err = MPI_SUCCESS; - do { - flag = 0; - for (i = 0; i < count; i++) { - if (requests[i] != MPIO_REQUEST_NULL) { - err = MPIO_Test(&requests[i], &flag, status); - if (flag) { - if (!err) - *index = i; - break; - } - } - } - } while (flag == 0); - - fn_exit: - ROMIO_THREAD_CS_EXIT(); - - return err; -} diff --git a/src/mpi/romio/mpi-io/iowaitsome.c b/src/mpi/romio/mpi-io/iowaitsome.c deleted file mode 100644 index d8204391247..00000000000 --- a/src/mpi/romio/mpi-io/iowaitsome.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPIO_Waitsome = PMPIO_Waitsome -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPIO_Waitsome MPIO_Waitsome -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPIO_Waitsome as PMPIO_Waitsome -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/* - This is a temporary function until we switch to using MPI-2's generalized - requests. -*/ - -int MPIO_Waitsome(int count, MPIO_Request requests[], int *outcount, - int indices[], MPI_Status * statuses) -{ - int i, flag, err; - - ROMIO_THREAD_CS_ENTER(); - - if (count == 1) { - err = MPIO_Wait(requests, statuses); - if (!err) { - *outcount = 1; - indices[0] = 0; - } - goto fn_exit; - } - - /* Check for no active requests */ - for (i = 0; i < count; i++) { - if (requests[i] != MPIO_REQUEST_NULL) { - break; - } - } - if (i == count) { - *outcount = MPI_UNDEFINED; - err = MPI_SUCCESS; - goto fn_exit; - } - - err = MPI_SUCCESS; - *outcount = 0; - do { - for (i = 0; i < count; i++) { - if (requests[i] != MPIO_REQUEST_NULL) { - err = MPIO_Test(&requests[i], &flag, statuses); - if (flag) { - if (!err) { - indices[0] = i; - indices++; - statuses++; - *outcount = *outcount + 1; - } - } - } - } - } while (*outcount == 0); - - fn_exit: - ROMIO_THREAD_CS_EXIT(); - return err; -} diff --git a/src/mpi/romio/mpi-io/iread.c b/src/mpi/romio/mpi-io/iread.c index f673affc21a..c1892d1f9d7 100644 --- a/src/mpi/romio/mpi-io/iread.c +++ b/src/mpi/romio/mpi-io/iread.c @@ -17,7 +17,7 @@ #pragma _CRI duplicate MPI_File_iread as PMPI_File_iread /* end of weak pragmas */ #elif defined(HAVE_ATTR_WEAK_ALIAS) -int MPI_File_iread(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPIO_Request * request) +int MPI_File_iread(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Request * request) __attribute__ ((weak, alias("PMPI_File_iread"))); #endif @@ -30,7 +30,7 @@ int MPI_File_iread(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI /* end of weak pragmas */ #elif defined(HAVE_ATTR_WEAK_ALIAS) int MPI_File_iread_c(MPI_File fh, void *buf, MPI_Count count, MPI_Datatype datatype, - MPIO_Request * request) + MPI_Request * request) __attribute__ ((weak, alias("PMPI_File_iread_c"))); #endif @@ -39,9 +39,7 @@ int MPI_File_iread_c(MPI_File fh, void *buf, MPI_Count count, MPI_Datatype datat #include "mpioprof.h" #endif -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif /*@ MPI_File_iread - Nonblocking read using individual file pointer @@ -78,9 +76,7 @@ int MPI_File_iread(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI /* large count function */ -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif /*@ MPI_File_iread_c - Nonblocking read using individual file pointer diff --git a/src/mpi/romio/mpi-io/iread_all.c b/src/mpi/romio/mpi-io/iread_all.c index fd1d7d798f4..ac15bc58beb 100644 --- a/src/mpi/romio/mpi-io/iread_all.c +++ b/src/mpi/romio/mpi-io/iread_all.c @@ -40,9 +40,7 @@ int MPI_File_iread_all_c(MPI_File fh, void *buf, MPI_Count count, MPI_Datatype d #include "mpioprof.h" #endif -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif /*@ MPI_File_iread_all - Nonblocking collective read using individual file pointer @@ -80,9 +78,7 @@ int MPI_File_iread_all(MPI_File fh, void *buf, int count, /* large count function */ -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif /*@ MPI_File_iread_all_c - Nonblocking collective read using individual file pointer diff --git a/src/mpi/romio/mpi-io/iread_at.c b/src/mpi/romio/mpi-io/iread_at.c index 58391f29dfd..1f8308624b4 100644 --- a/src/mpi/romio/mpi-io/iread_at.c +++ b/src/mpi/romio/mpi-io/iread_at.c @@ -18,7 +18,7 @@ /* end of weak pragmas */ #elif defined(HAVE_ATTR_WEAK_ALIAS) int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, - MPIO_Request * request) __attribute__ ((weak, alias("PMPI_File_iread_at"))); + MPI_Request * request) __attribute__ ((weak, alias("PMPI_File_iread_at"))); #endif #if defined(HAVE_PRAGMA_WEAK_ALIAS) @@ -30,7 +30,7 @@ int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_ /* end of weak pragmas */ #elif defined(HAVE_ATTR_WEAK_ALIAS) int MPI_File_iread_at_c(MPI_File fh, MPI_Offset offset, void *buf, MPI_Count count, - MPI_Datatype datatype, MPIO_Request * request) + MPI_Datatype datatype, MPI_Request * request) __attribute__ ((weak, alias("PMPI_File_iread_at_c"))); #endif @@ -39,9 +39,7 @@ int MPI_File_iread_at_c(MPI_File fh, MPI_Offset offset, void *buf, MPI_Count cou #include "mpioprof.h" #endif -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif /*@ MPI_File_iread_at - Nonblocking read using explicit offset @@ -59,7 +57,7 @@ Output Parameters: .N fortran @*/ int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, - MPIO_Request * request) + MPI_Request * request) { int error_code; ROMIO_THREAD_CS_ENTER(); @@ -80,9 +78,7 @@ int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_ /* large count function */ -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif /*@ MPI_File_iread_at_c - Nonblocking read using explicit offset @@ -100,7 +96,7 @@ Output Parameters: .N fortran @*/ int MPI_File_iread_at_c(MPI_File fh, MPI_Offset offset, void *buf, MPI_Count count, - MPI_Datatype datatype, MPIO_Request * request) + MPI_Datatype datatype, MPI_Request * request) { int error_code; ROMIO_THREAD_CS_ENTER(); diff --git a/src/mpi/romio/mpi-io/iread_atall.c b/src/mpi/romio/mpi-io/iread_atall.c index 7eea5d13e0d..f0e3ffb64d9 100644 --- a/src/mpi/romio/mpi-io/iread_atall.c +++ b/src/mpi/romio/mpi-io/iread_atall.c @@ -40,9 +40,7 @@ int MPI_File_iread_at_all_c(MPI_File fh, MPI_Offset offset, void *buf, MPI_Count #include "mpioprof.h" #endif -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif /*@ MPI_File_iread_at_all - Nonblocking collective read using explicit offset @@ -81,9 +79,7 @@ int MPI_File_iread_at_all(MPI_File fh, MPI_Offset offset, void *buf, /* large count function */ -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif /*@ MPI_File_iread_at_all_c - Nonblocking collective read using explicit offset diff --git a/src/mpi/romio/mpi-io/iread_sh.c b/src/mpi/romio/mpi-io/iread_sh.c index 820b1c73bb0..c5811fff41c 100644 --- a/src/mpi/romio/mpi-io/iread_sh.c +++ b/src/mpi/romio/mpi-io/iread_sh.c @@ -18,7 +18,7 @@ /* end of weak pragmas */ #elif defined(HAVE_ATTR_WEAK_ALIAS) int MPI_File_iread_shared(MPI_File fh, void *buf, int count, MPI_Datatype datatype, - MPIO_Request * request) + MPI_Request * request) __attribute__ ((weak, alias("PMPI_File_iread_shared"))); #endif @@ -31,7 +31,7 @@ int MPI_File_iread_shared(MPI_File fh, void *buf, int count, MPI_Datatype dataty /* end of weak pragmas */ #elif defined(HAVE_ATTR_WEAK_ALIAS) int MPI_File_iread_shared_c(MPI_File fh, void *buf, MPI_Count count, MPI_Datatype datatype, - MPIO_Request * request) + MPI_Request * request) __attribute__ ((weak, alias("PMPI_File_iread_shared_c"))); #endif @@ -40,9 +40,7 @@ int MPI_File_iread_shared_c(MPI_File fh, void *buf, MPI_Count count, MPI_Datatyp #include "mpioprof.h" #endif -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif /*@ MPI_File_iread_shared - Nonblocking read using shared file pointer diff --git a/src/mpi/romio/mpi-io/iwrite.c b/src/mpi/romio/mpi-io/iwrite.c index 002aeed1961..eef901bd0f7 100644 --- a/src/mpi/romio/mpi-io/iwrite.c +++ b/src/mpi/romio/mpi-io/iwrite.c @@ -18,7 +18,7 @@ /* end of weak pragmas */ #elif defined(HAVE_ATTR_WEAK_ALIAS) int MPI_File_iwrite(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, - MPIO_Request * request) __attribute__ ((weak, alias("PMPI_File_iwrite"))); + MPI_Request * request) __attribute__ ((weak, alias("PMPI_File_iwrite"))); #endif #if defined(HAVE_PRAGMA_WEAK_ALIAS) @@ -30,7 +30,7 @@ int MPI_File_iwrite(MPI_File fh, const void *buf, int count, MPI_Datatype dataty /* end of weak pragmas */ #elif defined(HAVE_ATTR_WEAK_ALIAS) int MPI_File_iwrite_c(MPI_File fh, const void *buf, MPI_Count count, MPI_Datatype datatype, - MPIO_Request * request) __attribute__ ((weak, alias("PMPI_File_iwrite_c"))); + MPI_Request * request) __attribute__ ((weak, alias("PMPI_File_iwrite_c"))); #endif /* Include mapping from MPI->PMPI */ @@ -52,9 +52,7 @@ Output Parameters: .N fortran @*/ -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif int MPI_File_iwrite(MPI_File fh, ROMIO_CONST void *buf, int count, MPI_Datatype datatype, MPI_Request * request) @@ -92,9 +90,7 @@ Output Parameters: .N fortran @*/ -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif int MPI_File_iwrite_c(MPI_File fh, ROMIO_CONST void *buf, MPI_Count count, MPI_Datatype datatype, MPI_Request * request) diff --git a/src/mpi/romio/mpi-io/iwrite_all.c b/src/mpi/romio/mpi-io/iwrite_all.c index 1b1a16b5d55..47fa383b7fb 100644 --- a/src/mpi/romio/mpi-io/iwrite_all.c +++ b/src/mpi/romio/mpi-io/iwrite_all.c @@ -40,9 +40,7 @@ int MPI_File_iwrite_all_c(MPI_File fh, const void *buf, MPI_Count count, MPI_Dat #include "mpioprof.h" #endif -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif /*@ MPI_File_iwrite_all - Nonblocking collective write using individual file pointer @@ -80,9 +78,7 @@ int MPI_File_iwrite_all(MPI_File fh, ROMIO_CONST void *buf, int count, /* large count function */ -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif /*@ MPI_File_iwrite_all_c - Nonblocking collective write using individual file pointer diff --git a/src/mpi/romio/mpi-io/iwrite_at.c b/src/mpi/romio/mpi-io/iwrite_at.c index 300b9941047..1c1e4a9d58c 100644 --- a/src/mpi/romio/mpi-io/iwrite_at.c +++ b/src/mpi/romio/mpi-io/iwrite_at.c @@ -18,7 +18,7 @@ /* end of weak pragmas */ #elif defined(HAVE_ATTR_WEAK_ALIAS) int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, const void *buf, int count, - MPI_Datatype datatype, MPIO_Request * request) + MPI_Datatype datatype, MPI_Request * request) __attribute__ ((weak, alias("PMPI_File_iwrite_at"))); #endif @@ -31,7 +31,7 @@ int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, const void *buf, int coun /* end of weak pragmas */ #elif defined(HAVE_ATTR_WEAK_ALIAS) int MPI_File_iwrite_at_c(MPI_File fh, MPI_Offset offset, const void *buf, MPI_Count count, - MPI_Datatype datatype, MPIO_Request * request) + MPI_Datatype datatype, MPI_Request * request) __attribute__ ((weak, alias("PMPI_File_iwrite_at_c"))); #endif @@ -55,12 +55,10 @@ Output Parameters: .N fortran @*/ -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, ROMIO_CONST void *buf, - int count, MPI_Datatype datatype, MPIO_Request * request) + int count, MPI_Datatype datatype, MPI_Request * request) { int error_code; ROMIO_THREAD_CS_ENTER(); @@ -96,12 +94,10 @@ Output Parameters: .N fortran @*/ -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif int MPI_File_iwrite_at_c(MPI_File fh, MPI_Offset offset, ROMIO_CONST void *buf, - MPI_Count count, MPI_Datatype datatype, MPIO_Request * request) + MPI_Count count, MPI_Datatype datatype, MPI_Request * request) { int error_code; ROMIO_THREAD_CS_ENTER(); diff --git a/src/mpi/romio/mpi-io/iwrite_atall.c b/src/mpi/romio/mpi-io/iwrite_atall.c index 5bab7a5152a..04adf31eff3 100644 --- a/src/mpi/romio/mpi-io/iwrite_atall.c +++ b/src/mpi/romio/mpi-io/iwrite_atall.c @@ -40,9 +40,7 @@ int MPI_File_iwrite_at_all_c(MPI_File fh, MPI_Offset offset, const void *buf, MP #include "mpioprof.h" #endif -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif /*@ MPI_File_iwrite_at_all - Nonblocking collective write using explicit offset @@ -81,9 +79,7 @@ int MPI_File_iwrite_at_all(MPI_File fh, MPI_Offset offset, ROMIO_CONST void *buf /* large count function */ -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif /*@ MPI_File_iwrite_at_all_c - Nonblocking collective write using explicit offset diff --git a/src/mpi/romio/mpi-io/iwrite_sh.c b/src/mpi/romio/mpi-io/iwrite_sh.c index fb633520d03..ebb421650be 100644 --- a/src/mpi/romio/mpi-io/iwrite_sh.c +++ b/src/mpi/romio/mpi-io/iwrite_sh.c @@ -18,7 +18,7 @@ /* end of weak pragmas */ #elif defined(HAVE_ATTR_WEAK_ALIAS) int MPI_File_iwrite_shared(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, - MPIO_Request * request) + MPI_Request * request) __attribute__ ((weak, alias("PMPI_File_iwrite_shared"))); #endif @@ -31,7 +31,7 @@ int MPI_File_iwrite_shared(MPI_File fh, const void *buf, int count, MPI_Datatype /* end of weak pragmas */ #elif defined(HAVE_ATTR_WEAK_ALIAS) int MPI_File_iwrite_shared_c(MPI_File fh, const void *buf, MPI_Count count, MPI_Datatype datatype, - MPIO_Request * request) + MPI_Request * request) __attribute__ ((weak, alias("PMPI_File_iwrite_shared_c"))); #endif @@ -54,12 +54,10 @@ Output Parameters: .N fortran @*/ -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif int MPI_File_iwrite_shared(MPI_File fh, ROMIO_CONST void *buf, int count, - MPI_Datatype datatype, MPIO_Request * request) + MPI_Datatype datatype, MPI_Request * request) { int error_code; ROMIO_THREAD_CS_ENTER(); @@ -94,12 +92,10 @@ Output Parameters: .N fortran @*/ -#ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -#endif int MPI_File_iwrite_shared_c(MPI_File fh, ROMIO_CONST void *buf, MPI_Count count, - MPI_Datatype datatype, MPIO_Request * request) + MPI_Datatype datatype, MPI_Request * request) { int error_code; ROMIO_THREAD_CS_ENTER(); diff --git a/src/mpi/romio/mpi-io/mpioimpl.h b/src/mpi/romio/mpi-io/mpioimpl.h index 4fbea820e9a..588fce858d7 100644 --- a/src/mpi/romio/mpi-io/mpioimpl.h +++ b/src/mpi/romio/mpi-io/mpioimpl.h @@ -12,7 +12,7 @@ #include "adio.h" -/* The handle conversion (MPI_File_c2f/f2c) need reserve the range [0, 4096) for ABI constants */ +/* The handle conversion (MPI_File_toint/fromint) need reserve the range [0, 4096) for ABI constants */ #define ROMIO_HANDLE_OFFSET 0x1000 #ifdef ROMIO_INSIDE_MPICH @@ -186,7 +186,7 @@ int MPIR_Register_datarep_large_impl(const char *datarep, MPI_Datarep_conversion_function_c * write_conversion_fn, MPI_Datarep_extent_function * dtype_file_extent_fn, void *extra_state); -MPI_Fint MPIR_File_c2f_impl(MPI_File fh); -MPI_File MPIR_File_f2c_impl(MPI_Fint fh); +int MPIR_File_toint_impl(MPI_File fh); +MPI_File MPIR_File_fromint_impl(int fh); #endif /* MPIOIMPL_H_INCLUDED */ diff --git a/src/mpi/romio/mpi-io/mpioprof.h b/src/mpi/romio/mpi-io/mpioprof.h index c32f812479a..b40f535aa15 100644 --- a/src/mpi/romio/mpi-io/mpioprof.h +++ b/src/mpi/romio/mpi-io/mpioprof.h @@ -150,13 +150,6 @@ #undef MPI_File_get_errhandler #define MPI_File_get_errhandler PMPI_File_get_errhandler -#if !defined(MPI_File_f2c) || defined(MPICH_RENAMING_MPI_FUNCS) -#undef MPI_File_f2c -#define MPI_File_f2c PMPI_File_f2c -#undef MPI_File_c2f -#define MPI_File_c2f PMPI_File_c2f -#endif - #undef MPI_File_read_c #define MPI_File_read_c PMPI_File_read_c #undef MPI_File_read_all_c @@ -218,56 +211,6 @@ #undef MPI_Register_datarep_c #define MPI_Register_datarep_c PMPI_Register_datarep_c -#undef MPIO_Test -#undef PMPIO_Test -#define MPIO_Test PMPIO_Test -#undef MPIO_Wait -#undef PMPIO_Wait -#define MPIO_Wait PMPIO_Wait -#undef MPIO_Testall -#define MPIO_Testall PMPIO_Testall -#undef MPIO_Waitall -#define MPIO_Waitall PMPIO_Waitall -#undef MPIO_Testany -#define MPIO_Testany PMPIO_Testany -#undef MPIO_Waitany -#define MPIO_Waitany PMPIO_Waitany -#undef MPIO_Testsome -#define MPIO_Testsome PMPIO_Testsome -#undef MPIO_Waitsome -#define MPIO_Waitsome PMPIO_Waitsome -#undef MPIO_Request_f2c -#define MPIO_Request_f2c PMPIO_Request_f2c -#undef MPIO_Request_c2f -#define MPIO_Request_c2f PMPIO_Request_c2f - -#if defined(HAVE_MPI_INFO_SRC) /* only in info source directory */ - -#undef MPI_Info_create -#define MPI_Info_create PMPI_Info_create -#undef MPI_Info_set -#define MPI_Info_set PMPI_Info_set -#undef MPI_Info_delete -#define MPI_Info_delete PMPI_Info_delete -#undef MPI_Info_get -#define MPI_Info_get PMPI_Info_get -#undef MPI_Info_get_valuelen -#define MPI_Info_get_valuelen PMPI_Info_get_valuelen -#undef MPI_Info_get_nkeys -#define MPI_Info_get_nkeys PMPI_Info_get_nkeys -#undef MPI_Info_get_nthkey -#define MPI_Info_get_nthkey PMPI_Info_get_nthkey -#undef MPI_Info_dup -#define MPI_Info_dup PMPI_Info_dup -#undef MPI_Info_free -#define MPI_Info_free PMPI_Info_free -#undef MPI_Info_c2f -#define MPI_Info_c2f PMPI_Info_c2f -#undef MPI_Info_f2c -#define MPI_Info_f2c PMPI_Info_f2c - -#endif - #undef MPI_Grequest_start #define MPI_Grequest_start PMPI_Grequest_start #undef MPI_Grequest_complete diff --git a/src/mpi/romio/mpi2-other/array/Makefile.in b/src/mpi/romio/mpi2-other/array/Makefile.in deleted file mode 100644 index 98179578e9c..00000000000 --- a/src/mpi/romio/mpi2-other/array/Makefile.in +++ /dev/null @@ -1,85 +0,0 @@ -## -## Copyright (C) by Argonne National Laboratory -## See COPYRIGHT in top-level directory -## - -CC = @CC@ -AR = @AR@ -LIBNAME = @LIBNAME@ -RANLIB = @RANLIB@ -srcdir = @srcdir@ -CC_SHL = @CC_SHL@ -SHLIBNAME = @SHLIBNAME@ - -INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I../../include -I${srcdir}/../../mpi-io -I${srcdir}/../../adio/include -I../../adio/include -CFLAGS = @CPPFLAGS@ @CFLAGS@ $(MPIOPROFILE) $(INCLUDE_DIR) - -top_builddir = @main_topbuild_dir@ -LIBTOOL = @LIBTOOL@ -C_COMPILE_SHL = $(CC_SHL) - -@VPATH@ - -MPIO_OBJECTS = subarray.o darray.o - -MPIO_TMP_POBJECTS = subarray.p darray.p - -MPIO_REAL_POBJECTS = _subarray.o _darray.o - -all: $(LIBNAME) - @if [ "@ENABLE_SHLIB@" != "none" ] ; then \ - $(MAKE) $(SHLIBNAME).la ;\ - fi - -.SUFFIXES: $(SUFFIXES) .p .sp .lo - -.c.o: - $(CC) $(CFLAGS) -c $< -.c.lo: - $(C_COMPILE_SHL) $(CFLAGS) -c $< -o _s$*.o - @mv -f _s$*.o $*.lo - -.c.p: - @cp $(srcdir)/$*.c _$*.c - $(CC) $(CFLAGS) -c _$*.c - @rm -f _$*.c - -.c.sp: - $(C_COMPILE_SHL) $(CFLAGS) -c $< -o _$*.lo - -profile: $(MPIO_REAL_POBJECTS) - $(AR) $(LIBNAME) $(MPIO_REAL_POBJECTS) - $(RANLIB) $(LIBNAME) - @if [ "@ENABLE_SHLIB@" != "none" ] ; then \ - $(MAKE) P$(SHLIBNAME).la ;\ - fi - @rm -f _*.o - -$(LIBNAME): $(MPIO_OBJECTS) - $(AR) $(LIBNAME) $(MPIO_OBJECTS) - $(RANLIB) $(LIBNAME) - -MPIO_LOOBJECTS = $(MPIO_OBJECTS:.o=.lo) -$(SHLIBNAME).la: $(MPIO_LOOBJECTS) - $(AR) $(SHLIBNAME).la $(MPIO_LOOBJECTS) - -# -------------------------------------------------------------------------- -# We use P$(SHLBNAME) simply to distinguish the regular lib build from the -# profiling library build -MPIO_LOPOBJECTS = $(MPIO_REAL_POBJECTS:.o=.lo) -MPIO_TMP_LOPOBJECTS = ${MPIO_TMP_POBJECTS:.p=.sp} -P$(SHLIBNAME).la: $(MPIO_TMP_LOPOBJECTS) - $(AR) $(SHLIBNAME).la $(MPIO_LOPOBJECTS) -# -------------------------------------------------------------------------- - -clean: - @rm -f *.o *.lo *.gcno *.gcda *.bb *.bbg - @rm -f ${srcdir}/*.gcno ${srcdir}/*.gcda - @rm -f ${srcdir}/*.bb ${srcdir}/*.bbg - -# Rules for the profiling objects -_subarray.o: subarray.c - $(CC) $(CFLAGS) -c $(srcdir)/subarray.c -o _subarray.o -_darray.o: darray.c - $(CC) $(CFLAGS) -c $(srcdir)/darray.c -o _darray.o - diff --git a/src/mpi/romio/mpi2-other/array/darray.c b/src/mpi/romio/mpi2-other/array/darray.c deleted file mode 100644 index 840b4cd5343..00000000000 --- a/src/mpi/romio/mpi2-other/array/darray.c +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPI_Type_create_darray = PMPI_Type_create_darray -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPI_Type_create_darray MPI_Type_create_darray -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPI_Type_create_darray as PMPI_Type_create_darray -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/*@ -MPI_Type_create_darray - Creates a datatype corresponding to a distributed, multidimensional array - -Input Parameters: -. size - size of process group (positive integer) -. rank - rank in process group (nonnegative integer) -. ndims - number of array dimensions as well as process grid dimensions (positive integer) -. array_of_gsizes - number of elements of type oldtype in each dimension of global array (array of positive integers) -. array_of_distribs - distribution of array in each dimension (array of state) -. array_of_dargs - distribution argument in each dimension (array of positive integers) -. array_of_psizes - size of process grid in each dimension (array of positive integers) -. order - array storage order flag (state) -. oldtype - old datatype (handle) - -Output Parameters: -. newtype - new datatype (handle) - -.N fortran -@*/ -int MPI_Type_create_darray(int size, int rank, int ndims, - int *array_of_gsizes, int *array_of_distribs, - int *array_of_dargs, int *array_of_psizes, - int order, MPI_Datatype oldtype, MPI_Datatype * newtype) -{ - int err, error_code; - int i; - MPI_Aint lb, orig_extent, size_with_aint; - MPI_Offset size_with_offset; - static char myname[] = "MPI_TYPE_CREATE_DARRAY"; - - /* --BEGIN ERROR HANDLING-- */ - if (size <= 0) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid size argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - if (rank < 0) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid rank argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - if (ndims <= 0) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid ndoms argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - if (array_of_gsizes <= (int *) 0) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid array_of_gsizes argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - if (array_of_distribs <= (int *) 0) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid array_of_distribs argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - if (array_of_dargs <= (int *) 0) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid array_of_dargs argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - if (array_of_psizes <= (int *) 0) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid array_of_psizes argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - - for (i = 0; i < ndims; i++) { - if (array_of_gsizes[i] <= 0) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid gsize argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - - /* array_of_distribs checked below */ - - if ((array_of_dargs[i] != MPI_DISTRIBUTE_DFLT_DARG) && (array_of_dargs[i] <= 0)) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid darg argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - - if (array_of_psizes[i] <= 0) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid psize argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - if (array_of_distribs[i] != MPI_DISTRIBUTE_BLOCK && - array_of_distribs[i] != MPI_DISTRIBUTE_CYCLIC && - array_of_distribs[i] != MPI_DISTRIBUTE_NONE) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, - MPI_ERR_ARG, "Invalid distrib argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - if (array_of_distribs[i] == MPI_DISTRIBUTE_NONE && array_of_psizes[i] != 1) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, - MPI_ERR_ARG, - "For MPI_DISTRIBUTE_NONE, the number of processes in that dimension of the grid must be 1", - 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - } - - /* order argument checked below */ - - if (oldtype == MPI_DATATYPE_NULL) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid type argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - - MPI_Type_get_extent(oldtype, &lb, &orig_extent); - -/* check if MPI_Aint is large enough for size of global array. - if not, complain. */ - - size_with_aint = orig_extent; - for (i = 0; i < ndims; i++) - size_with_aint *= array_of_gsizes[i]; - size_with_offset = orig_extent; - for (i = 0; i < ndims; i++) - size_with_offset *= array_of_gsizes[i]; - - if (size_with_aint != size_with_offset) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, "Invalid array size", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - - if (order != MPI_ORDER_FORTRAN && order != MPI_ORDER_C) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid order argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - /* --END ERROR HANDLING-- */ - - err = ADIO_Type_create_darray(size, - rank, - ndims, - array_of_gsizes, - array_of_distribs, - array_of_dargs, array_of_psizes, order, oldtype, newtype); - /* --BEGIN ERROR HANDLING-- */ - if (err != MPI_SUCCESS) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, err, "Internal error", 0); - } - /* --END ERROR HANDLING-- */ - - return MPI_SUCCESS; -} diff --git a/src/mpi/romio/mpi2-other/array/subarray.c b/src/mpi/romio/mpi2-other/array/subarray.c deleted file mode 100644 index b5464a422ab..00000000000 --- a/src/mpi/romio/mpi2-other/array/subarray.c +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPI_Type_create_subarray = PMPI_Type_create_subarray -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPI_Type_create_subarray MPI_Type_create_subarray -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPI_Type_create_subarray as PMPI_Type_create_subarray -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/*@ -MPI_Type_create_subarray - Creates a datatype describing a subarray of a multidimensional array - -Input Parameters: -. ndims - number of array dimensions (positive integer) -. array_of_sizes - number of elements of type oldtype in each dimension of the full array (array of positive integers) -. array_of_subsizes - number of elements of type oldtype in each dimension of the subarray (array of positive integers) -. array_of_starts - starting coordinates of the subarray in each dimension (array of nonnegative integers) -. order - array storage order flag (state) -. oldtype - old datatype (handle) - -Output Parameters: -. newtype - new datatype (handle) - -.N fortran -@*/ -int MPI_Type_create_subarray(int ndims, int *array_of_sizes, - int *array_of_subsizes, int *array_of_starts, - int order, MPI_Datatype oldtype, MPI_Datatype * newtype) -{ - MPI_Aint lb, extent, size_with_aint; - int i, err, error_code; - MPI_Offset size_with_offset; - - /* --BEGIN ERROR HANDLING-- */ - if (ndims <= 0) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid ndims argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - if (array_of_sizes <= (int *) 0) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid array_of_sizes argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - if (array_of_subsizes <= (int *) 0) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid array_of_subsizes argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - if (array_of_starts <= (int *) 0) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid array_of_starts argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - - for (i = 0; i < ndims; i++) { - if (array_of_sizes[i] <= 0) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid size argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - if (array_of_subsizes[i] <= 0) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid subsize argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - if (array_of_starts[i] < 0) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid start argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - if (array_of_subsizes[i] > array_of_sizes[i]) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid subsize argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - if (array_of_starts[i] > (array_of_sizes[i] - array_of_subsizes[i])) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid start argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - } - - /* order argument checked below */ - - if (oldtype == MPI_DATATYPE_NULL) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid type argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - - MPI_Type_get_extent(oldtype, &lb, &extent); - -/* check if MPI_Aint is large enough for size of global array. - if not, complain. */ - - size_with_aint = extent; - for (i = 0; i < ndims; i++) - size_with_aint *= array_of_sizes[i]; - size_with_offset = extent; - for (i = 0; i < ndims; i++) - size_with_offset *= array_of_sizes[i]; - if (size_with_aint != size_with_offset) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid size argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - - if (order != MPI_ORDER_FORTRAN && order != MPI_ORDER_C) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid order argument", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - /* --END ERROR HANDLING-- */ - - err = ADIO_Type_create_subarray(ndims, - array_of_sizes, - array_of_subsizes, array_of_starts, order, oldtype, newtype); - /* --BEGIN ERROR HANDLING-- */ - if (err != MPI_SUCCESS) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, err, "Internal error", 0); - } - /* --END ERROR HANDLING-- */ - - return MPI_SUCCESS; -} diff --git a/src/mpi/romio/mpi2-other/info/Makefile.in b/src/mpi/romio/mpi2-other/info/Makefile.in deleted file mode 100644 index ebe29a1252f..00000000000 --- a/src/mpi/romio/mpi2-other/info/Makefile.in +++ /dev/null @@ -1,110 +0,0 @@ -## -## Copyright (C) by Argonne National Laboratory -## See COPYRIGHT in top-level directory -## - -CC = @CC@ -AR = @AR@ -LIBNAME = @LIBNAME@ -RANLIB = @RANLIB@ -srcdir = @srcdir@ -CC_SHL = @CC_SHL@ -SHLIBNAME = @SHLIBNAME@ - -INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I../../include -I${srcdir}/../../mpi-io -I${srcdir}/../../adio/include -I../../adio/include -CFLAGS = -DHAVE_MPI_INFO_SRC @CFLAGS@ $(MPIOPROFILE) $(INCLUDE_DIR) - -top_builddir = @main_topbuild_dir@ -LIBTOOL = @LIBTOOL@ -C_COMPILE_SHL = $(CC_SHL) - -@VPATH@ - -MPIO_OBJECTS = info_create.o info_dup.o info_get.o info_getnth.o \ - info_set.o info_delete.o info_free.o info_getnks.o info_getvln.o \ - info_c2f.o info_f2c.o - -MPIO_TMP_POBJECTS = info_create.p info_dup.p info_get.p info_getnth.p \ - info_set.p info_delete.p info_free.p info_getnks.p info_getvln.p \ - info_c2f.p info_f2c.p - -MPIO_REAL_POBJECTS = _info_create.o _info_dup.o _info_get.o _info_getnth.o \ - _info_set.o _info_delete.o _info_free.o _info_getnks.o _info_getvln.o \ - _info_c2f.o _info_f2c.o - -all: $(LIBNAME) - @if [ "@ENABLE_SHLIB@" != "none" ] ; then \ - $(MAKE) $(SHLIBNAME).la ;\ - fi - -.SUFFIXES: $(SUFFIXES) .p .sp .lo - -.c.o: - $(CC) $(CFLAGS) -c $< - -.c.lo: - $(C_COMPILE_SHL) $(CFLAGS) -c $< -o _s$*.o - @mv -f _s$*.o $*.lo - -.c.p: - @cp $(srcdir)/$*.c _$*.c - $(CC) $(CFLAGS) -c _$*.c - @rm -f _$*.c - -.c.sp: - $(C_COMPILE_SHL) $(CFLAGS) -c $< -o _$*.lo - -profile: $(MPIO_REAL_POBJECTS) - $(AR) $(LIBNAME) $(MPIO_REAL_POBJECTS) - $(RANLIB) $(LIBNAME) - @if [ "@ENABLE_SHLIB@" != "none" ] ; then \ - $(MAKE) P$(SHLIBNAME).la ;\ - fi - @rm -f _*.o - -$(LIBNAME): $(MPIO_OBJECTS) - $(AR) $(LIBNAME) $(MPIO_OBJECTS) - $(RANLIB) $(LIBNAME) - -MPIO_LOOBJECTS = $(MPIO_OBJECTS:.o=.lo) -$(SHLIBNAME).la: $(MPIO_LOOBJECTS) - $(AR) $(SHLIBNAME).la $(MPIO_LOOBJECTS) - -# -------------------------------------------------------------------------- -# We use P$(SHLBNAME) simply to distinguish the regular lib build from the -# profiling library build -MPIO_LOPOBJECTS = $(MPIO_REAL_POBJECTS:.o=.lo) -MPIO_TMP_LOPOBJECTS = ${MPIO_TMP_POBJECTS:.p=.sp} -P$(SHLIBNAME).la: $(MPIO_TMP_LOPOBJECTS) - $(AR) $(SHLIBNAME).la $(MPIO_LOPOBJECTS) -# -------------------------------------------------------------------------- - -clean: - @rm -f *.o *.lo *.gcno *.gcda *.bb *.bbg - @rm -f ${srcdir}/*.gcno ${srcdir}/*.gcda - @rm -f ${srcdir}/*.bb ${srcdir}/*.bbg - - -# Rules for the profiling objects -info_create.o: infocreate.c - $(CC) $(CFLAGS) -c $(srcdir)/infocreate.c -o _info_create.o -info_dup.o: infodup.c - $(CC) $(CFLAGS) -c $(srcdir)/infodup.c -o _info_dup.o -info_get.o: infoget.c - $(CC) $(CFLAGS) -c $(srcdir)/infoget.c -o _info_get.o -info_getnth.o: infogetnth.c - $(CC) $(CFLAGS) -c $(srcdir)/infogetnth.c -o _info_getnth.o -info_set.o: infoset.c - $(CC) $(CFLAGS) -c $(srcdir)/infoset.c -o _info_set.o -info_delete.o: infodelete.c - $(CC) $(CFLAGS) -c $(srcdir)/infodelete.c -o _info_delete.o -info_free.o: infofree.c - $(CC) $(CFLAGS) -c $(srcdir)/infofree.c -o _info_free.o -info_getnks.o: infogetnks.c - $(CC) $(CFLAGS) -c $(srcdir)/infogetnks.c -o _info_getnks.o -info_getvln.o: infogetvln.c - $(CC) $(CFLAGS) -c $(srcdir)/infogetvln.c -o _info_getvln.o -info_c2f.o: infoc2f.c - $(CC) $(CFLAGS) -c $(srcdir)/infoc2f.c -o _info_c2f.o -info_f2c.o: infof2c.c - $(CC) $(CFLAGS) -c $(srcdir)/infof2c.c -o _info_f2c.o diff --git a/src/mpi/romio/mpi2-other/info/info_c2f.c b/src/mpi/romio/mpi2-other/info/info_c2f.c deleted file mode 100644 index eae025551eb..00000000000 --- a/src/mpi/romio/mpi2-other/info/info_c2f.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPI_Info_c2f = PMPI_Info_c2f -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPI_Info_c2f MPI_Info_c2f -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPI_Info_c2f as PMPI_Info_c2f -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif -#include "adio_extern.h" - -/*@ - MPI_Info_c2f - Translates a C info handle to a Fortran info handle - -Input Parameters: -. info - C info handle (integer) - -Return Value: - Fortran info handle (handle) -@*/ -MPI_Fint MPI_Info_c2f(MPI_Info info) -{ -#ifndef INT_LT_POINTER - return (MPI_Fint) info; -#else - int i; - - if ((info <= (MPI_Info) 0) || (info->cookie != MPIR_INFO_COOKIE)) - return (MPI_Fint) 0; - if (!MPIR_Infotable) { - MPIR_Infotable_max = 1024; - MPIR_Infotable = (MPI_Info *) - ADIOI_Malloc(MPIR_Infotable_max * sizeof(MPI_Info)); - MPIR_Infotable_ptr = 0; /* 0 can't be used though, because - * MPI_INFO_NULL=0 */ - for (i = 0; i < MPIR_Infotable_max; i++) - MPIR_Infotable[i] = MPI_INFO_NULL; - } - if (MPIR_Infotable_ptr == MPIR_Infotable_max - 1) { - MPIR_Infotable = (MPI_Info *) ADIOI_Realloc(MPIR_Infotable, - (MPIR_Infotable_max + 1024) * sizeof(MPI_Info)); - for (i = MPIR_Infotable_max; i < MPIR_Infotable_max + 1024; i++) - MPIR_Infotable[i] = MPI_INFO_NULL; - MPIR_Infotable_max += 1024; - } - MPIR_Infotable_ptr++; - MPIR_Infotable[MPIR_Infotable_ptr] = info; - return (MPI_Fint) MPIR_Infotable_ptr; -#endif -} diff --git a/src/mpi/romio/mpi2-other/info/info_create.c b/src/mpi/romio/mpi2-other/info/info_create.c deleted file mode 100644 index 8c8c9a13e40..00000000000 --- a/src/mpi/romio/mpi2-other/info/info_create.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPI_Info_create = PMPI_Info_create -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPI_Info_create MPI_Info_create -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPI_Info_create as PMPI_Info_create -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/*@ - MPI_Info_create - Creates a new info object - -Output Parameters: -. info - info object (handle) - -.N fortran -@*/ -int MPI_Info_create(MPI_Info * info) -{ - int error_code; - - MPIR_MPIOInit(&error_code); - if (error_code != MPI_SUCCESS) - goto fn_exit; - - *info = (MPI_Info) ADIOI_Malloc(sizeof(struct MPIR_Info)); - (*info)->cookie = MPIR_INFO_COOKIE; - (*info)->key = 0; - (*info)->value = 0; - (*info)->next = 0; - /* this is the first structure in this linked list. it is - * always kept empty. new (key,value) pairs are added after it. */ - - fn_exit: - return MPI_SUCCESS; -} diff --git a/src/mpi/romio/mpi2-other/info/info_delete.c b/src/mpi/romio/mpi2-other/info/info_delete.c deleted file mode 100644 index be8c963a3b8..00000000000 --- a/src/mpi/romio/mpi2-other/info/info_delete.c +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPI_Info_delete = PMPI_Info_delete -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPI_Info_delete MPI_Info_delete -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPI_Info_delete as PMPI_Info_delete -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/*@ - MPI_Info_delete - Deletes a (key,value) pair from info - -Input Parameters: -. info - info object (handle) -. key - key (string) - -.N fortran -@*/ -int MPI_Info_delete(MPI_Info info, char *key) -{ - MPI_Info prev, curr; - int done; - - if ((info <= (MPI_Info) 0) || (info->cookie != MPIR_INFO_COOKIE)) { - FPRINTF(stderr, "MPI_Info_delete: Invalid info object\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (key <= (char *) 0) { - FPRINTF(stderr, "MPI_Info_delete: key is an invalid address\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (strlen(key) > MPI_MAX_INFO_KEY) { - FPRINTF(stderr, "MPI_Info_delete: key is longer than MPI_MAX_INFO_KEY\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (!strlen(key)) { - FPRINTF(stderr, "MPI_Info_delete: key is a null string\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - prev = info; - curr = info->next; - done = 0; - - while (curr) { - if (!strcmp(curr->key, key)) { - ADIOI_Free(curr->key); - ADIOI_Free(curr->value); - prev->next = curr->next; - ADIOI_Free(curr); - done = 1; - break; - } - prev = curr; - curr = curr->next; - } - - if (!done) { - FPRINTF(stderr, "MPI_Info_delete: key not defined in info\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - return MPI_SUCCESS; -} diff --git a/src/mpi/romio/mpi2-other/info/info_dup.c b/src/mpi/romio/mpi2-other/info/info_dup.c deleted file mode 100644 index 9df72f2a28f..00000000000 --- a/src/mpi/romio/mpi2-other/info/info_dup.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPI_Info_dup = PMPI_Info_dup -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPI_Info_dup MPI_Info_dup -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPI_Info_dup as PMPI_Info_dup -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/*@ - MPI_Info_dup - Returns a duplicate of the info object - -Input Parameters: -. info - info object (handle) - -Output Parameters: -. newinfo - duplicate of info object (handle) - -.N fortran -@*/ -int MPI_Info_dup(MPI_Info info, MPI_Info * newinfo) -{ - MPI_Info curr_old, curr_new; - - if ((info <= (MPI_Info) 0) || (info->cookie != MPIR_INFO_COOKIE)) { - FPRINTF(stderr, "MPI_Info_dup: Invalid info object\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - *newinfo = (MPI_Info) ADIOI_Malloc(sizeof(struct MPIR_Info)); - curr_new = *newinfo; - curr_new->cookie = MPIR_INFO_COOKIE; - curr_new->key = 0; - curr_new->value = 0; - curr_new->next = 0; - - curr_old = info->next; - while (curr_old) { - curr_new->next = (MPI_Info) ADIOI_Malloc(sizeof(struct MPIR_Info)); - curr_new = curr_new->next; - curr_new->cookie = 0; /* cookie not set on purpose */ - curr_new->key = ADIOI_Strdup(curr_old->key); - curr_new->value = ADIOI_Strdup(curr_old->value); - curr_new->next = 0; - - curr_old = curr_old->next; - } - - return MPI_SUCCESS; -} diff --git a/src/mpi/romio/mpi2-other/info/info_f2c.c b/src/mpi/romio/mpi2-other/info/info_f2c.c deleted file mode 100644 index a2aca9fd78c..00000000000 --- a/src/mpi/romio/mpi2-other/info/info_f2c.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPI_Info_f2c = PMPI_Info_f2c -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPI_Info_f2c MPI_Info_f2c -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPI_Info_f2c as PMPI_Info_f2c -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif -#include "adio_extern.h" - -/*@ - MPI_Info_f2c - Translates a Fortran info handle to a C info handle - -Input Parameters: -. info - Fortran info handle (integer) - -Return Value: - C info handle (handle) -@*/ -MPI_Info MPI_Info_f2c(MPI_Fint info) -{ - -#ifndef INT_LT_POINTER - return (MPI_Info) info; -#else - if (!info) - return MPI_INFO_NULL; - if ((info < 0) || (info > MPIR_Infotable_ptr)) { - FPRINTF(stderr, "MPI_Info_f2c: Invalid info handle\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - return MPIR_Infotable[info]; -#endif -} diff --git a/src/mpi/romio/mpi2-other/info/info_free.c b/src/mpi/romio/mpi2-other/info/info_free.c deleted file mode 100644 index 78cb4656671..00000000000 --- a/src/mpi/romio/mpi2-other/info/info_free.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPI_Info_free = PMPI_Info_free -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPI_Info_free MPI_Info_free -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPI_Info_free as PMPI_Info_free -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/*@ - MPI_Info_free - Frees an info object - -Input Parameters: -. info - info object (handle) - -.N fortran -@*/ -int MPI_Info_free(MPI_Info * info) -{ - MPI_Info curr, next; - - if ((*info <= (MPI_Info) 0) || ((*info)->cookie != MPIR_INFO_COOKIE)) { - FPRINTF(stderr, "MPI_Info_free: Invalid info object\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - curr = (*info)->next; - ADIOI_Free(*info); - *info = MPI_INFO_NULL; - - while (curr) { - next = curr->next; - ADIOI_Free(curr->key); - ADIOI_Free(curr->value); - ADIOI_Free(curr); - curr = next; - } - - return MPI_SUCCESS; -} diff --git a/src/mpi/romio/mpi2-other/info/info_get.c b/src/mpi/romio/mpi2-other/info/info_get.c deleted file mode 100644 index 9fb1f3c205b..00000000000 --- a/src/mpi/romio/mpi2-other/info/info_get.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPI_Info_get = PMPI_Info_get -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPI_Info_get MPI_Info_get -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPI_Info_get as PMPI_Info_get -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/*@ - MPI_Info_get - Retrieves the value associated with a key - -Input Parameters: -. info - info object (handle) -. key - key (string) -. valuelen - length of value argument (integer) - -Output Parameters: -. value - value (string) -. flag - true if key defined, false if not (boolean) - -.N fortran -@*/ -int MPI_Info_get(MPI_Info info, char *key, int valuelen, char *value, int *flag) -{ - MPI_Info curr; - - if ((info <= (MPI_Info) 0) || (info->cookie != MPIR_INFO_COOKIE)) { - FPRINTF(stderr, "MPI_Info_get: Invalid info object\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (key <= (char *) 0) { - FPRINTF(stderr, "MPI_Info_get: key is an invalid address\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (strlen(key) > MPI_MAX_INFO_KEY) { - FPRINTF(stderr, "MPI_Info_get: key is longer than MPI_MAX_INFO_KEY\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (!strlen(key)) { - FPRINTF(stderr, "MPI_Info_get: key is a null string\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (valuelen <= 0) { - FPRINTF(stderr, "MPI_Info_get: Invalid valuelen argument\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (value <= (char *) 0) { - FPRINTF(stderr, "MPI_Info_get: value is an invalid address\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - curr = info->next; - *flag = 0; - - while (curr) { - if (!strcmp(curr->key, key)) { - ADIOI_Strncpy(value, curr->value, valuelen); - value[valuelen] = '\0'; - *flag = 1; - break; - } - curr = curr->next; - } - - return MPI_SUCCESS; -} diff --git a/src/mpi/romio/mpi2-other/info/info_getnks.c b/src/mpi/romio/mpi2-other/info/info_getnks.c deleted file mode 100644 index fc3eefa0830..00000000000 --- a/src/mpi/romio/mpi2-other/info/info_getnks.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPI_Info_get_nkeys = PMPI_Info_get_nkeys -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPI_Info_get_nkeys MPI_Info_get_nkeys -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPI_Info_get_nkeys as PMPI_Info_get_nkeys -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/*@ - MPI_Info_get_nkeys - Returns the number of currently defined keys in info - -Input Parameters: -. info - info object (handle) - -Output Parameters: -. nkeys - number of defined keys (integer) - -.N fortran -@*/ -int MPI_Info_get_nkeys(MPI_Info info, int *nkeys) -{ - MPI_Info curr; - - if ((info <= (MPI_Info) 0) || (info->cookie != MPIR_INFO_COOKIE)) { - FPRINTF(stderr, "MPI_Info_get_nkeys: Invalid info object\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - curr = info->next; - *nkeys = 0; - - while (curr) { - curr = curr->next; - (*nkeys)++; - } - - return MPI_SUCCESS; -} diff --git a/src/mpi/romio/mpi2-other/info/info_getnth.c b/src/mpi/romio/mpi2-other/info/info_getnth.c deleted file mode 100644 index 40b7111abbe..00000000000 --- a/src/mpi/romio/mpi2-other/info/info_getnth.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPI_Info_get_nthkey = PMPI_Info_get_nthkey -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPI_Info_get_nthkey MPI_Info_get_nthkey -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPI_Info_get_nthkey as PMPI_Info_get_nthkey -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/*@ - MPI_Info_get_nthkey - Returns the nth defined key in info - -Input Parameters: -. info - info object (handle) -. n - key number (integer) - -Output Parameters: -. keys - key (string) - -.N fortran -@*/ -int MPI_Info_get_nthkey(MPI_Info info, int n, char *key) -{ - MPI_Info curr; - int nkeys, i; - - if ((info <= (MPI_Info) 0) || (info->cookie != MPIR_INFO_COOKIE)) { - FPRINTF(stderr, "MPI_Info_get_nthkey: Invalid info object\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (key <= (char *) 0) { - FPRINTF(stderr, "MPI_Info_get: key is an invalid address\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - curr = info->next; - nkeys = 0; - while (curr) { - curr = curr->next; - nkeys++; - } - - if ((n < 0) || (n >= nkeys)) { - FPRINTF(stderr, "MPI_Info_get_nthkey: n is an invalid number\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - curr = info->next; - i = 0; - while (i < n) { - curr = curr->next; - i++; - } - ADIOI_Strncpy(key, curr->key, MPI_MAX_INFO_KEY); - - return MPI_SUCCESS; -} diff --git a/src/mpi/romio/mpi2-other/info/info_getvln.c b/src/mpi/romio/mpi2-other/info/info_getvln.c deleted file mode 100644 index ebcd570510c..00000000000 --- a/src/mpi/romio/mpi2-other/info/info_getvln.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPI_Info_get_valuelen = PMPI_Info_get_valuelen -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPI_Info_get_valuelen MPI_Info_get_valuelen -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPI_Info_get_valuelen as PMPI_Info_get_valuelen -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/*@ - MPI_Info_get_valuelen - Retrieves the length of the value associated with a key - -Input Parameters: -. info - info object (handle) -. key - key (string) - -Output Parameters: -. valuelen - length of value argument (integer) -. flag - true if key defined, false if not (boolean) - -.N fortran -@*/ -int MPI_Info_get_valuelen(MPI_Info info, char *key, int *valuelen, int *flag) -{ - MPI_Info curr; - - if ((info <= (MPI_Info) 0) || (info->cookie != MPIR_INFO_COOKIE)) { - FPRINTF(stderr, "MPI_Info_get_valuelen: Invalid info object\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (key <= (char *) 0) { - FPRINTF(stderr, "MPI_Info_get_valuelen: key is an invalid address\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (strlen(key) > MPI_MAX_INFO_KEY) { - FPRINTF(stderr, "MPI_Info_get_valuelen: key is longer than MPI_MAX_INFO_KEY\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (!strlen(key)) { - FPRINTF(stderr, "MPI_Info_get_valuelen: key is a null string\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - curr = info->next; - *flag = 0; - - while (curr) { - if (!strcmp(curr->key, key)) { - *valuelen = strlen(curr->value); - *flag = 1; - break; - } - curr = curr->next; - } - - return MPI_SUCCESS; -} diff --git a/src/mpi/romio/mpi2-other/info/info_set.c b/src/mpi/romio/mpi2-other/info/info_set.c deleted file mode 100644 index 230346df433..00000000000 --- a/src/mpi/romio/mpi2-other/info/info_set.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (C) by Argonne National Laboratory - * See COPYRIGHT in top-level directory - */ - -#include "mpioimpl.h" - -#ifdef HAVE_WEAK_SYMBOLS - -#if defined(HAVE_PRAGMA_WEAK_ALIAS) -#pragma weak MPI_Info_set = PMPI_Info_set -#elif defined(HAVE_PRAGMA_HP_SEC_DEF) -#pragma _HP_SECONDARY_DEF PMPI_Info_set MPI_Info_set -#elif defined(HAVE_PRAGMA_CRI_DUP) -#pragma _CRI duplicate MPI_Info_set as PMPI_Info_set -/* end of weak pragmas */ -#endif - -/* Include mapping from MPI->PMPI */ -#define MPIO_BUILD_PROFILING -#include "mpioprof.h" -#endif - -/*@ - MPI_Info_set - Adds a (key,value) pair to info - -Input Parameters: -. info - info object (handle) -. key - key (string) -. value - value (string) - -.N fortran -@*/ -int MPI_Info_set(MPI_Info info, char *key, char *value) -{ - MPI_Info prev, curr; - - if ((info <= (MPI_Info) 0) || (info->cookie != MPIR_INFO_COOKIE)) { - FPRINTF(stderr, "MPI_Info_set: Invalid info object\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (key <= (char *) 0) { - FPRINTF(stderr, "MPI_Info_set: key is an invalid address\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (value <= (char *) 0) { - FPRINTF(stderr, "MPI_Info_set: value is an invalid address\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (strlen(key) > MPI_MAX_INFO_KEY) { - FPRINTF(stderr, "MPI_Info_set: key is longer than MPI_MAX_INFO_KEY\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (strlen(value) > MPI_MAX_INFO_VAL) { - FPRINTF(stderr, "MPI_Info_set: value is longer than MPI_MAX_INFO_VAL\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (!strlen(key)) { - FPRINTF(stderr, "MPI_Info_set: key is a null string\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - if (!strlen(value)) { - FPRINTF(stderr, "MPI_Info_set: value is a null string\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } - - prev = info; - curr = info->next; - - while (curr) { - if (!strcmp(curr->key, key)) { - ADIOI_Free(curr->value); - curr->value = ADIOI_Strdup(value); - break; - } - prev = curr; - curr = curr->next; - } - - if (!curr) { - prev->next = (MPI_Info) ADIOI_Malloc(sizeof(struct MPIR_Info)); - curr = prev->next; - curr->cookie = 0; /* cookie not set on purpose */ - curr->key = ADIOI_Strdup(key); - curr->value = ADIOI_Strdup(value); - curr->next = 0; - } - - return MPI_SUCCESS; -} diff --git a/src/mpi/romio/test/.codingcheck b/src/mpi/romio/test/.codingcheck deleted file mode 100644 index 0d0a655fa81..00000000000 --- a/src/mpi/romio/test/.codingcheck +++ /dev/null @@ -1,13 +0,0 @@ -# -# We allow these routines for the romio test programs -%romioTestRoutines = ( - 'printf' => sys, 'fprintf' => sys , 'sprintf' => sys, 'vprintf' => sys, - 'strcpy' => sys, 'strncpy' => sys, 'strcat' => sys, - 'malloc' => sys, 'free' => sys, 'calloc' => sys, 'strdup' => sys, - 'assert' => sys, 'snprintf' => sys, - ); -if (defined(&PushAllowFuncNames)) { - &PushAllowFuncNames( "romioTestRoutines", "tree", "add" ); -} - -1; diff --git a/src/nameserv/test/.codingcheck b/src/nameserv/test/.codingcheck deleted file mode 100644 index 4a5dde8b58d..00000000000 --- a/src/nameserv/test/.codingcheck +++ /dev/null @@ -1,13 +0,0 @@ -# -# We allow these routines for the nameserv test programs -%nameservTestRoutines = ( - 'printf' => sys, 'fprintf' => sys , 'sprintf' => sys, 'vprintf' => sys, - 'strcpy' => sys, 'strncpy' => sys, 'strcat' => sys, - 'malloc' => sys, 'free' => sys, 'calloc' => sys, 'strdup' => sys, - 'assert' => sys, 'snprintf' => sys, - ); -if (defined(&PushAllowFuncNames)) { - &PushAllowFuncNames( "nameservTestRoutines", "tree", "add" ); -} - -1; diff --git a/src/pm/util/test/.codingcheck b/src/pm/util/test/.codingcheck deleted file mode 100644 index 74ac8dd074f..00000000000 --- a/src/pm/util/test/.codingcheck +++ /dev/null @@ -1,13 +0,0 @@ -# -# We allow these routines for the pmutil test programs -%pmutilTestRoutines = ( - 'printf' => sys, 'fprintf' => sys , 'sprintf' => sys, 'vprintf' => sys, - 'strcpy' => sys, 'strncpy' => sys, 'strcat' => sys, - 'malloc' => sys, 'free' => sys, 'calloc' => sys, 'strdup' => sys, - 'assert' => sys, 'snprintf' => sys, - ); -if (defined(&PushAllowFuncNames)) { - &PushAllowFuncNames( "pmutilTestRoutines", "tree", "add" ); -} - -1; diff --git a/test/.codingcheck b/test/.codingcheck deleted file mode 100644 index 63df01d62d3..00000000000 --- a/test/.codingcheck +++ /dev/null @@ -1,18 +0,0 @@ -# -# We allow these routines for the test programs -# -%gTestFuncs = ( - 'printf' => sys, 'fprintf' => sys , 'sprintf' => sys, 'vprintf' => sys, - 'strcpy' => sys, 'strncpy' => sys, - 'malloc' => sys, 'free' => sys, 'calloc' => sys, - 'assert' => sys, - ); -&PushAllowFuncNames( gTestFuncs, "tree", "add"); -# -# Also add additional CPP names -%gTestNames = ( 'DEBUG' => 1 ); -if (defined(&PushDefinesNames)) { - &PushDefinesNames( "gTestNames", "tree", "add" ); -} - -1;