/* -*- c -*- * * LAM configuation header file. * See the top-level LICENSE file for license and copyright * information. * * $Id: acconfig.h,v 6.25 2001/04/02 15:43:43 jsquyres Exp $ * * Function: - OS, CPU and compiler dependent configuration */ #ifndef _LAM_CONFIG_H #define _LAM_CONFIG_H @TOP@ /* * Version and configuration information */ #define LAM_ARCH "unknown" #define LAM_RPI "unknown" #define LAM_VERSION "unknown" #define LAM_MAJOR_VERSION "unknown" #define LAM_MINOR_VERSION "unknown" #define LAM_RELEASE_VERSION "unknown" #define LAM_ALPHA_VERSION "unknown" #define LAM_BETA_VERSION "unknown" /* * Signal used internally by LAM. */ #define LAM_SIGUSR SIGUSR2 /* * Choose the RPI. Set *ONE* of these to 1. */ #define LAM_RPI_TCP 0 #define LAM_RPI_SHM_SYSV 0 #define LAM_RPI_SHM_USYSV 0 #define LAM_RPI_MYRI 0 #define LAM_RPI_VIA 0 /* * Some RPI's allow the use of the "shortcircuit" to bypass the normal * queue progression if the queue is empty. */ #define SHORTCIRCUIT 0 /* * Define as 1 if you have it. * Slightly risky here -- only define this if is hasn't already been * defined. Prevents redefinitions from other libraries (hopefully * they're set to the same value!) */ #ifndef HAVE_ATEXIT #define HAVE_ATEXIT 0 #endif #ifndef HAVE_GETCWD #define HAVE_GETCWD 0 #endif #ifndef HAVE_SNPRINTF #define HAVE_SNPRINTF 0 #endif #ifndef HAVE_ATOLL #define HAVE_ATOLL 0 #endif #ifndef HAVE_STRTOLL #define HAVE_STRTOLL 0 #endif #ifndef HAVE_SCHED_H #define HAVE_SCHED_H 0 #endif #ifndef HAVE_STROPTS_H #define HAVE_STROPTS_H 0 #endif #ifndef HAVE_GRP_H #define HAVE_GRP_H 0 #endif #ifndef HAVE_NETINET_TCP_H #define HAVE_NETINET_TCP_H 0 #endif #ifndef HAVE_RPC_TYPES_H #define HAVE_RPC_TYPES_H 0 #endif #ifndef HAVE_RPC_XDR_H #define HAVE_RPC_XDR_H 0 #endif /* * Use to select for IMPI support or not */ #define LAM_WANT_IMPI 0 #define LAM_WANT_IMPI_SERVER 0 #define LAM_IMPI_SERVER "bogus" /* * Check the characteristics of our C++ compiler * Only do this if we're compiling IMPI! */ #if LAM_WANT_IMPI #define LAM_CXX_NOTHROW_NEW 0 #define LAM_CXX_NOTHROW_NEW_ARG 0 #define LAM_CXX_EXCEPTIONS 0 #define LAM_CXX_BOOL 0 #define LAM_CXX_TRUE_FALSE 0 #if !LAM_CXX_BOOL /* If we do not have bool, we do not have true or false either */ typedef enum { false, true } bool; #else /* * If we do have bool, we may or may not have true and false (!). * Can't just typedef true and false, though, because some compilers * will make typedef types as small as possible, which may not be the * same type/size as "bool" (e.g., if bool is and int) */ #if !LAM_CXX_TRUE_FALSE bool false = (bool) 0; bool true = (bool) 1; #endif #endif #endif /* LAM_WANT_IMPI */ /* * Various LAM tests */ #define LAM_HAVE_SA_RESTART 0 #define LAM_HAVE_SA_LEN 0 #define LAM_HAVE_UNION_SEMUN 0 #define LAM_HAVE_FIONBIO 0 #define LAM_HAVE_BSD43_FD_PASSING 0 #define LAM_HAVE_BSD44_FD_PASSING 0 #define LAM_HAVE_SVR4_FD_PASSING 0 #define LAM_HAVE_OPENPTY 0 #define LAM_HAVE_BSD_PTYS 0 #define LAM_HAVE_SYSV_PTYS 0 #define LAM_HAVE_PTYS (LAM_HAVE_BSD_PTYS || LAM_HAVE_SYSV_PTYS) /* * Define as 1 if have yield() or sched_yield() function. */ #ifndef HAVE_SCHED_YIELD #define HAVE_SCHED_YIELD 0 #endif /* * Define as 1 if you need it. */ #define LAM_NEED_SYS_SELECT_H 0 /* * Set *ONE* of these to 1 according to the format the FORTRAN compiler * uses for external names. */ #define LAM_WANT_FORTRAN 0 #define LAM_FORTRANNOUNDERSCORE 0 #define LAM_FORTRANCAPS 0 #define LAM_FORTRANUNDERSCORE 0 #define LAM_FORTRANDOUBLEUNDERSCORE 0 /* * Predefined types */ #define LAM_HAVE_int2 0 #define LAM_HAVE_uint2 0 #define LAM_HAVE_int4 0 #define LAM_HAVE_uint4 0 #define LAM_HAVE_int8 0 #define LAM_HAVE_uint8 0 #define LAM_HAVE_float4 0 #define LAM_HAVE_float8 0 /* * Type sizes. * Very, very annoying because of standardized AC_CHECK_SIZEOF macro... */ #define LAM_SIZEOF_SHORT 0 #define LAM_SIZEOF_WCHAR 0 #define LAM_SIZEOF_INT 0 #define LAM_SIZEOF_LONG 0 #define LAM_SIZEOF_LONG_LONG 0 #define LAM_SIZEOF_FLOAT 0 #define LAM_SIZEOF_DOUBLE 0 #define LAM_SIZEOF_LONG_DOUBLE 0 #define LAM_SIZEOF_VOID_P 0 #define LAM_ALIGNMENT_SHORT 0 #define LAM_ALIGNMENT_WCHAR 0 #define LAM_ALIGNMENT_INT 0 #define LAM_ALIGNMENT_LONG 0 #define LAM_ALIGNMENT_LONG_LONG 0 #define LAM_ALIGNMENT_FLOAT 0 #define LAM_ALIGNMENT_DOUBLE 0 #define LAM_ALIGNMENT_LONG_DOUBLE 0 #define LAM_ALIGNMENT_VOID_P 0 #define LAM_SIZEOF_FORTRAN_INT 0 #define LAM_SIZEOF_FORTRAN_REAL 0 #define LAM_SIZEOF_FORTRAN_DBLPREC 0 #define LAM_SIZEOF_FORTRAN_COMPLEX 0 #define LAM_SIZEOF_FORTRAN_DBLCOMPLEX 0 #define LAM_ALIGNMENT_FORTRAN_INT 0 #define LAM_ALIGNMENT_FORTRAN_REAL 0 #define LAM_ALIGNMENT_FORTRAN_COMPLEX 0 #define LAM_ALIGNMENT_FORTRAN_DBLPREC 0 #define LAM_ALIGNMENT_FORTRAN_DBLCOMPLEX 0 /* * Use select for spinlock yielding even when OS yield functionality is * available. */ #define LAM_USE_SELECT_YIELD 0 /* * Define to 1 if the struct stat elements are not int4's * Currently, this is only for the portland group compilers */ #define LAM_STAT_MEMBERS_INT4 1 /* * Which threads package do we have? */ #define LAM_HAVE_SOL_THREADS 0 #if LAM_HAVE_SOL_THREADS #include #include typedef thread_t lam_thread_t; typedef mutex_t lam_real_mutex_t; #endif #define LAM_HAVE_PTHREADS 0 #if LAM_HAVE_PTHREADS #include typedef pthread_t lam_thread_t; typedef pthread_mutex_t lam_real_mutex_t; #endif #define LAM_HAVE_THREADS (LAM_HAVE_SOL_THREADS || LAM_HAVE_PTHREADS) #if !LAM_HAVE_THREADS typedef int lam_thread_t; typedef int lam_real_mutex_t; #endif /* * Define to 1 if we want ROMIO support * Some architectures need -laio in conjunction with ROMIO */ #define LAM_WANT_ROMIO 1 #define HAVE_LIBAIO 0 /* * Do we want the profiling layer? */ #define LAM_WANT_PROFILE 1 /* * Define to 1 if we want MPI 2 C++ bindings support */ #define LAM_WANT_MPI2CPP 1 /* * Some compilers do not define __STDC__ correctly (e.g., Solaris * workshop, at least version 4.2). As such, the LAM header files * will not include full ANSI prototyping, which is a real pain for * users. We can override that here -- set to 1 if you want full * ANSI prototypes. */ #define LAM_CONFIG_FORCE_PROTOS 1 #if __STDC__ || defined(c_plusplus) || defined(__cplusplus) || LAM_CONFIG_FORCE_PROTOS #define LAM_WANT_PROTOS 1 #else #define LAM_WANT_PROTOS 0 #endif /* * Use to select if definitely want to zero out memory before using it. * This affects lower layers of message passing API, where purify, bcheck, * and other memory-checking debuggers will sometimes complain about * "read from uninitialized" and the like, when the code actually shows * that it is ok. That is, LAM will function correctly with or without * this flag -- this flag only affects what purify/bcheck/etc. will report. * Note that there will be slightly more overhead in message passing if * this flag is enabled. */ #define LAM_DISINFECT 0 #if LAM_DISINFECT #include #define LAM_ZERO_ME(a) memset(&(a), 0, sizeof((a))); #else #define LAM_ZERO_ME(a) #endif /* * Keep the compilers that were chosen in configure for use in the * wrapper compilers hcc, hcp, and hf77. The C++ compiler is defined * in tools/hcc/hcp.in */ #define LAM_CC "cc" #define LAM_F77 "f77" /* * Find out the right type for the option length parameter to * getsockopt() , and the length parameter in recvfrom(). #$%#%&# * AIX!!! */ #define LAM_SOCK_OPTLEN_T int #define LAM_RECVFROM_LEN_T int /* * Values that are necessary because of our standardized acinclude.m4, * but not used anywhere in LAM */ #define LAM_CXX_STL 0 #define LAM_HAVE__PROTO 0 /* * Parameters for the selected RPI */ #define LAM_TCPSHORTMSGLEN 65536 /* max. length tcp short msg */ #define LAM_SHMSHORTMSGLEN 8192 /* max. length shm short msg */ #define LAM_MPI_SHMPOOLSIZE 0 /* size of long message pool */ #define LAM_MPI_SHMMAXALLOC 0 /* max allocation of shmem */ /* * dlo timeouts for the lamd */ #define LAM_TO_BOOT 60 /* boot timeout in seconds */ #define LAM_TO_DLO_ACK 1 /* ack timeout in seconds */ #define LAM_TO_DLO_IDLE 120 /* idle timeout */ /* * What remote agent program do we want? */ #define LAM_RSH "bogusness" #define LAM_RSH_NEED_MINUSMINUS 0 /* * System libraries */ #define LAM_SYSLIBS "bogusness" #define LAM_HBIND "bogusness" /* * $#%^#$^#$%^ HP-UX fortran!!!! */ #define LAM_FLIBPATH "bogusness" /* * RPI flags */ #define LAM_RPI_REAL_CFLAGS "bogusness" #define LAM_RPI_REAL_LDFLAGS "bogusness" #define LAM_RPI_FAKE_CFLAGS "bogusness" #define LAM_RPI_FAKE_LDFLAGS "bogusness" /* * What do we do to rm */ #define LAM_RM "bogusness" @BOTTOM@ /* * Grumble. AC_C_BIGENDIAN #defines WORDS_BIGENDIAN to 1 if we're on * a big endian machine. But it leaves it undefined if we're on a * little endian machine (same for HAVE_YIELD). This causes "gcc * -Wundef" to complain when we use "#if WORDS_BIGENDIAN". So #define * it here to be 0 if it isn't already defined. */ #ifndef WORDS_BIGENDIAN #define WORDS_BIGENDIAN 0 #endif #ifndef HAVE_YIELD #define HAVE_YIELD 0 #endif /* * In some places, we need to swap the endian (particularly in IMPI) */ #if LAM_WANT_IMPI #if WORDS_BIGENDIAN #define LAM_SWAP_ENDIAN(x, y) #else #define LAM_SWAP_ENDIAN(x, y) lam_swap_endian(x, y) #endif #endif /* * Some compilers complain when sizeof(long double) == sizeof(double) * Example: gcc/linux 2.95.2 on alpha (64 bit) */ #if LAM_SIZEOF_DOUBLE == LAM_SIZEOF_LONG_DOUBLE typedef double LAM_LONG_DOUBLE; #else typedef long double LAM_LONG_DOUBLE; #endif /* * For one reason or another (not worth listing here), autoheader * isn't smart enough to copy these lines automatically. Hence, we * put them under @BOTTOM@ */ /* * Some OS's are missing prototypes */ #define LAM_HAVE_snprintf_PROTO 0 #define LAM_HAVE_gethostname_PROTO 0 /* * If we don't have the gethostname proto, make it */ #if !LAM_HAVE_gethostname_PROTO #if defined(c_plusplus) || defined(__cplusplus) extern "C" { #endif int gethostname(char *name, int namelen); #if defined(c_plusplus) || defined(__cplusplus) } #endif #endif /* * Define as 1 if broken. * Can't find an OS that's broken these days, but let's keep it here * just to be safe. */ #define LAM_BROKEN_SET_INET_SO_BUFSIZES 0 #define LAM_BROKEN_SET_UNIX_SO_BUFSIZES 0 /* * GER define * * per-process-pair minimum envelope slots */ #define MPI_GER 8 /* * See if we can use "const" or not */ #define CONST const /* * Define as 1 if floating point is IEEE. */ #define HAVE_IEEE_FP 1 /* * Provide a cast to go from an int to a (void*), or empty if * sizeof(void*) == sizeof(int). This is necessary on arches where we * need to first promote an int up to an integer type of the same size * as (void*), and then cast that to (void*), eg., Alpha Linux. * * Weird logic here so that we avoid the cast whenever possible -- so * we end up duplicating the "no cast" case. For example, if we only * had to no cast case at the end, if we are on a architecture where * sizeof(int) == sizeof(long) == sizeof(void*) (e.g., Solaris 2.6), * we'll always end up casting through long. Icky. */ #if LAM_SIZEOF_INT == LAM_SIZEOF_VOID_P #define LAM_INT_TO_VOID_P #elif LAM_SIZEOF_VOID_P == LAM_SIZEOF_LONG #define LAM_INT_TO_VOID_P (long) #elif LAM_SIZEOF_VOID_P == LAM_SIZEOF_LONG_LONG #define LAM_INT_TO_VOID_P (long long) #else #define LAM_INT_TO_VOID_P #endif /* * prototypes */ #ifndef __ARGS #if LAM_WANT_PROTOS #define __ARGS(a) a #else #define __ARGS(a) () #endif #endif #endif /* _LAM_CONFIG_H */