2004-01-07 22:33:37 +03:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*
|
2004-06-07 19:33:53 +04:00
|
|
|
* This file is included at the bottom of ompi_config.h, and is
|
2004-01-07 22:33:37 +03:00
|
|
|
* therefore a) after all the #define's that were output from
|
2004-08-06 18:30:18 +04:00
|
|
|
* configure, and b) included in most/all files in Open MPI.
|
2004-01-07 22:33:37 +03:00
|
|
|
*
|
2004-06-07 19:33:53 +04:00
|
|
|
* Since this file is *only* ever included by ompi_config.h, and
|
|
|
|
* ompi_config.h already has #ifndef/#endif protection, there is no
|
2004-01-07 22:33:37 +03:00
|
|
|
* need to #ifndef/#endif protection here.
|
|
|
|
*/
|
|
|
|
|
2004-01-14 10:06:57 +03:00
|
|
|
/*
|
|
|
|
* If we're in C, bring in the bool type and true/false constants.
|
|
|
|
*/
|
2004-01-07 22:33:37 +03:00
|
|
|
#ifndef __cplusplus
|
2004-08-05 15:12:25 +04:00
|
|
|
#if OMPI_USE_STDBOOL_H
|
2004-01-07 22:33:37 +03:00
|
|
|
#include <stdbool.h>
|
|
|
|
#else
|
|
|
|
typedef enum { false, true } bool;
|
|
|
|
#endif
|
|
|
|
#endif
|
2004-01-09 21:40:26 +03:00
|
|
|
|
2004-03-17 22:21:56 +03:00
|
|
|
|
2004-01-09 21:40:26 +03:00
|
|
|
/*
|
|
|
|
* Maximum size of a filename path.
|
|
|
|
*/
|
2004-01-14 10:06:57 +03:00
|
|
|
#include <limits.h>
|
2004-01-09 21:40:26 +03:00
|
|
|
#if defined(PATH_MAX)
|
2004-06-07 19:33:53 +04:00
|
|
|
#define OMPI_PATH_MAX (PATH_MAX + 1)
|
2004-01-09 21:40:26 +03:00
|
|
|
#elif defined(_POSIX_PATH_MAX)
|
2004-06-07 19:33:53 +04:00
|
|
|
#define OMPI_PATH_MAX (_POSIX_PATH_MAX + 1)
|
2004-01-09 21:40:26 +03:00
|
|
|
#else
|
2004-06-07 19:33:53 +04:00
|
|
|
#define OMPI_PATH_MAX 256
|
2004-01-09 21:40:26 +03:00
|
|
|
#endif
|
2004-01-14 10:06:57 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Do we have thread support?
|
|
|
|
*/
|
2004-06-07 19:33:53 +04:00
|
|
|
#define OMPI_HAVE_THREADS (OMPI_HAVE_SOLARIS_THREADS || OMPI_HAVE_POSIX_THREADS)
|
2004-01-17 07:10:01 +03:00
|
|
|
|
2004-02-13 22:59:34 +03:00
|
|
|
/* parameter indicating if to check MPI arguments */
|
2004-06-07 19:33:53 +04:00
|
|
|
extern bool ompi_mpi_param_check;
|
2004-02-13 22:59:34 +03:00
|
|
|
|
2004-01-17 07:10:01 +03:00
|
|
|
/*
|
|
|
|
* Do we have <stdint.h>?
|
|
|
|
*/
|
|
|
|
#if HAVE_STDINT_H
|
|
|
|
#include <stdint.h>
|
2004-03-17 22:21:56 +03:00
|
|
|
#else
|
2004-06-07 19:33:53 +04:00
|
|
|
#include "ompi_stdint.h"
|
2004-01-17 07:10:01 +03:00
|
|
|
#endif
|
2004-02-10 03:07:09 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Do we want memory debugging?
|
2004-07-14 19:13:32 +04:00
|
|
|
*
|
|
|
|
* A few scenarios:
|
|
|
|
*
|
|
|
|
* 1. In the OMPI C library: we want these defines in all cases
|
|
|
|
* 2. In the OMPI C++ bindings: we do not want them
|
|
|
|
* 3. In the OMPI C++ executables: we do want them
|
|
|
|
*
|
|
|
|
* So for 1, everyone must include <ompi_config.h> first. For 2, the
|
|
|
|
* C++ bindings will never include <ompi_config.h> -- they will only
|
|
|
|
* include <mpi.h>, which includes <ompi_config.h>, but after
|
|
|
|
* OMPI_MPI_H is defined. For 3, it's the same as 1 -- just include
|
|
|
|
* <ompi_config.h> first.
|
2004-02-10 03:07:09 +03:00
|
|
|
*/
|
2004-07-14 19:13:32 +04:00
|
|
|
#if OMPI_ENABLE_MEM_DEBUG && defined(OMPI_BUILDING) && OMPI_BUILDING && !defined(OMPI_MPI_H)
|
2004-02-10 03:07:09 +03:00
|
|
|
|
2004-06-15 23:07:45 +04:00
|
|
|
/* It is safe to include util/malloc.h here because a) it will only
|
2004-06-07 19:33:53 +04:00
|
|
|
happen when we are building OMPI and therefore have a full OMPI
|
2004-02-10 03:07:09 +03:00
|
|
|
source tree [including headers] available, and b) we guaranteed to
|
2004-03-17 21:45:16 +03:00
|
|
|
*not* to include anything else via mem/malloc.h, so we won't
|
2004-02-10 03:07:09 +03:00
|
|
|
have Cascading Includes Of Death. */
|
2004-06-15 23:07:45 +04:00
|
|
|
#include "util/malloc.h"
|
2004-06-07 19:33:53 +04:00
|
|
|
#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__)
|
2004-02-10 03:07:09 +03:00
|
|
|
#endif
|
2004-02-13 08:39:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Do we want to override debugging controls?
|
|
|
|
*/
|
2004-06-07 19:33:53 +04:00
|
|
|
#if defined(OMPI_ENABLE_DEBUG_OVERRIDE) && OMPI_ENABLE_DEBUG_OVERRIDE
|
|
|
|
#undef OMPI_ENABLE_DEBUG
|
|
|
|
#define OMPI_ENABLE_DEBUG 1
|
2004-02-13 08:39:46 +03:00
|
|
|
#endif
|
2004-06-29 04:02:25 +04:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* 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;
|