a5a712b31f
real commit of the collectives. MPI_SCAN and MPI_EXSCAN are still not implemented, but lots of other things are in the critical path and holding up other people, so it's ok to commit without them: - better checks for sizes in configure, and add defaults for fortran sizes if we don't have a fortran compiler - fix some logic that was accidentally broken for size checks for the file type offset_t - add some C equivalent types for fortran's complex and double complex (for use in internal reduction/op functions) - additionals and slight reorganization of ompi_mpi_init() ompi_mpi_finalize() - fully implement all top-level MPI collective calls, including all param checking for both intra- and inter-communicators (woof) - change the communicator_t type for stuff that we need in coll, and update all references throughout the code base to match - all kinds of updates to the coll framework base - next cut of the basic coll module -- has all intracommunicator collectives implemented except scan and exscan (see note above). All intercommunicator functions return ERR_NOT_IMPLEMENTED. - MPI_Op is a fixed implementation -- not component-ized yet. So there are generic C loops for all implementations. This commit was SVN r1491.
96 строки
2.2 KiB
C
96 строки
2.2 KiB
C
/*
|
|
* $HEADER$
|
|
*
|
|
* This file is included at the bottom of ompi_config.h, and is
|
|
* therefore a) after all the #define's that were output from
|
|
* configure, and b) included in most/all files in OMPI/MPI.
|
|
*
|
|
* Since this file is *only* ever included by ompi_config.h, and
|
|
* ompi_config.h already has #ifndef/#endif protection, there is no
|
|
* need to #ifndef/#endif protection here.
|
|
*/
|
|
|
|
/*
|
|
* If we're in C, bring in the bool type and true/false constants.
|
|
*/
|
|
#ifndef __cplusplus
|
|
#ifdef HAVE_STDBOOL_H
|
|
#include <stdbool.h>
|
|
#else
|
|
typedef enum { false, true } bool;
|
|
#endif
|
|
#endif
|
|
|
|
|
|
/*
|
|
* Maximum size of a filename path.
|
|
*/
|
|
#include <limits.h>
|
|
#if defined(PATH_MAX)
|
|
#define OMPI_PATH_MAX (PATH_MAX + 1)
|
|
#elif defined(_POSIX_PATH_MAX)
|
|
#define OMPI_PATH_MAX (_POSIX_PATH_MAX + 1)
|
|
#else
|
|
#define OMPI_PATH_MAX 256
|
|
#endif
|
|
|
|
/*
|
|
* Do we have thread support?
|
|
*/
|
|
#define OMPI_HAVE_THREADS (OMPI_HAVE_SOLARIS_THREADS || OMPI_HAVE_POSIX_THREADS)
|
|
|
|
/* parameter indicating if to check MPI arguments */
|
|
extern bool ompi_mpi_param_check;
|
|
|
|
/*
|
|
* Do we have <stdint.h>?
|
|
*/
|
|
#if HAVE_STDINT_H
|
|
#include <stdint.h>
|
|
#else
|
|
#include "ompi_stdint.h"
|
|
#endif
|
|
|
|
/*
|
|
* Do we want memory debugging?
|
|
*/
|
|
#if OMPI_ENABLE_MEM_DEBUG && defined(OMPI_BUILDING) && OMPI_BUILDING
|
|
|
|
/* It is safe to include util/malloc.h here because a) it will only
|
|
happen when we are building OMPI and therefore have a full OMPI
|
|
source tree [including headers] available, and b) we guaranteed to
|
|
*not* to include anything else via mem/malloc.h, so we won't
|
|
have Cascading Includes Of Death. */
|
|
#include "util/malloc.h"
|
|
#define malloc(size) ompi_malloc((size), __FILE__, __LINE__)
|
|
#define realloc(ptr, size) ompi_realloc((ptr), (size), __FILE__, __LINE__)
|
|
#define free(ptr) ompi_free((ptr), __FILE__, __LINE__)
|
|
#endif
|
|
|
|
|
|
/*
|
|
* Do we want to override debugging controls?
|
|
*/
|
|
#if defined(OMPI_ENABLE_DEBUG_OVERRIDE) && OMPI_ENABLE_DEBUG_OVERRIDE
|
|
#undef OMPI_ENABLE_DEBUG
|
|
#define OMPI_ENABLE_DEBUG 1
|
|
#endif
|
|
|
|
|
|
/*
|
|
* C type for Fortran COMPLEX
|
|
*/
|
|
typedef struct {
|
|
ompi_fortran_real_t real;
|
|
ompi_fortran_real_t imag;
|
|
} ompi_fortran_complex_t;
|
|
|
|
|
|
/*
|
|
* C type for Fortran DOUBLE COMPLEX
|
|
*/
|
|
typedef struct {
|
|
ompi_fortran_dblprec_t real;
|
|
ompi_fortran_dblprec_t imag;
|
|
} ompi_fortran_dblcomplex_t;
|